Date: Tue, 29 Jul 1997 11:40:27 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: brian@awfulhak.org (Brian Somers) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: date(1) Message-ID: <199707290210.LAA09434@genesis.atrad.adelaide.edu.au> In-Reply-To: <199707281949.UAA21778@awfulhak.org> from Brian Somers at "Jul 28, 97 08:49:28 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Brian Somers stands accused of saying: > > I'd like to add the following functionality to date(1) in -current, > and eventually backport it to RELENG_2_2. The argument against is > that it introduces more cruft into /bin, but I think date(1) is the > correct place for it. > > The following flags will "adjust" the displayed date: > > -D [+|-]days > -M [+|-]months > -W [+|-]weekdays > -Y [+|-]years > > Without the + or - before the given day/month/weekday/year, the > appropriate bit of the date will be set to the given value. With > the + or -, the date will be adjusted by the given value. > > For example, ``date -D1'' will output the date on the first of this > month, ``date -D1 -D-1'' will output the last day of last month, > ``date -D1 -D-1 -W+saturday'' will output the date on the first > Saturday of this month and ``date -D1 -M+1 -W-fri'' will output > the last Friday of the month. > > The flags are processed strictly in order. > > The functionality can be used to provide arguments to programs and > would be *really* useful for archiving scripts. > > Any objections or suggestions ? Please also add : - The ability to parse timestamps in ctime()-like format. - The ability to input and output the timestamp in decimal or hex localtime() format, ie. 0xXXXXXXXX or DDDDDDDDDD > Brian <brian@awfulhak.org>, <brian@freebsd.org> -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707290210.LAA09434>