[Chicago-talk] Calculate Date on SunOS
Andrew Rodland
arodland at comcast.net
Wed Jan 14 19:57:52 PST 2009
On Wednesday 14 January 2009 09:49:55 pm tiger peng wrote:
> Actually, I only want something as simple as GNU's date command:
>
> -> date --date=yesterday +%Y%m%d
> 20090113
> -> date --date="next week" +%Y%m%d
> 20090121
>
$ perl -MPOSIX=strftime -le 'print strftime "%Y%m%d",localtime (time - 86400)'
20090113
$ perl -MPOSIX=strftime -le 'print strftime "%Y%m%d",localtime (time+7*86400)'
20090121
Andrew
More information about the Chicago-talk
mailing list