3 ms·date -d @$1 +%Y-%m-%dby Hello71 7y agodate -d @$1 +%Y-%m-%ddanappelxx 7y ago$ date -R Gets you very close with fewer charactersHello71 7y agoI mean, if you're not fixed on the output format, then date +%c.