Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Date prompt expansion



At 11:46 +0000 26 Nov 2012, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
Up to oddities with leap seconds, you can do it by

zmodload zsh/datetime
strftime -s yesterdaysDay "+%d" $(( EPOCHSECONDS - 24 * 60 * 60 ))

Unless I'm missing something, that would also have problems around the beginning and end of daylight saving time, for a whole hour in each case rather than just for a single second as with leap seconds.



Messages sorted by: Reverse Date, Date, Thread, Author