Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
can zsh / strftime do "date math"?
- X-seq: zsh-users 16493
- From: TJ Luoma <tj@xxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: can zsh / strftime do "date math"?
- Date: Mon, 17 Oct 2011 01:36:36 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=yT/SmjX1xeeZVF50IF29UcqU19cRBC3pgzOVO9uTyOg=; b=xvGafRUX4b5+NPZPO/tj/91w2wEcO+96lu3OQROjA6y/Vaz6CxPaihpF0R77DnmfwP tMLO7oewWPaSwG70mZc8K3v9emeexaOqwvdkm2XQ+YcjZBF4RvljA2xwcTnSxIQWGMgl vGWpybdIOM7UCDlRMFwD/Mp/HIpPTKAemJ6VQ=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Sender: luomat@xxxxxxxxx
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