On Wed, Sep 08, 2004 at 12:51:00PM +0200, Poul-Henning Kamp wrote: > > I have sometimes needed to get the date of yesterday or last monday > and so on for creating filenames. > > We have this very flexible code in at(1) and cvs(1) for specifying > time. > Anyone up for making it possible to say: > > date -w "2 days ago" FWIW, there's a public-domain implementation that PHP uses for its strtotime() function (http://php.net/strtotime), and it appears to do all/most of what /usr/src/usr.bin/at/parsetime.c does, plus more (time zones, for example). http://cvs.php.net/co.php/php-src/ext/standard/parsedate.y?r=1.56 GeoffReceived on Wed Sep 08 2004 - 10:30:33 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:11 UTC