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

can zsh / strftime do "date math"?



I use the 'gdate' program the from the GNU coreutils to do "date math"
(I don't know if that's the right term or not).

For example, if I wanted to know the time would be in 17 hours, 14
minutes, and 6 seconds, I would use

	gdate --date "+ 17 hours 14 minutes 06 seconds"

I can also use the various '%' arguments to format the output, like so

	gdate --date "+ 17 hours 14 minutes 06 seconds" '+%Y%m%d'`

I'm wondering if there's any way of doing the same thing with zsh.

TjL



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