[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Future date

From: Greg Wooledge
Subject: Re: Future date
Date: Mon, 25 Jan 2016 08:23:10 -0500
User-agent: Mutt/

On Sun, Jan 24, 2016 at 11:58:27PM +0000, Val Krem wrote:
> So easy, I am just learning about bash scripting.
> date -d 'next month' +%b%Y
> What would happen in December 2016. Will it give me Jan2017?

Try It And See.

imadev:~$ gdate -d 'December 15, 2016 +1 month'
Sun Jan 15 00:00:00 EST 2017

Just to be clear, the -d 'human readable stuff' option is specific to GNU
date, and won't work on other systems.  Also, the 'human readable stuff'
part is NOT specified.  There is no documentation for what is allowed
there, and what is not.  You have to figure it out by trial and error,
and it may change between versions of GNU date.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]