Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Aug 1997 04:27:47 +0100
From:      Brian Somers <brian@awfulhak.org>
To:        Greg Lehey <grog@lemis.com>
Cc:        brian@awfulhak.org (Brian Somers), hackers@freebsd.org
Subject:   Re: date(1) 
Message-ID:  <199708010327.EAA05954@awfulhak.org>
In-Reply-To: Your message of "Fri, 01 Aug 1997 12:30:29 %2B0930." <199708010300.MAA08376@freebie.lemis.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> + [[cc[yy[mm[dd[hh]]]]]mm[.ss]]
> +
> + this syntax can be expanded to:
> + 
> + [[cc[yy[mm[dd]]]]mm[.ss]]
> + [[cc[yy[mm]]]mm[.ss]]
> + [[cc[yy]]mm[.ss]]
> + [[cc]mm[.ss]]
> + [mm[.ss]]
> + [[cc[yy[mm[dd]]]]mm]
> + [[cc[yy[mm]]]mm]
> + [[cc[yy]]mm]
> + [[cc]mm]
> + 
> + So 'date 2001' must mean "set the date to century 20, year undefined,
> + month, day, and hour undefined, minute 1.
> + 
> + Most newcomers to UNIX hate date(1) because the date entry format is
> + already too cryptic.  This would just make it worse.  There are some
> + other alternatives for date entry--tar uses one, for example, though
> + it may be GNU code.  Why not base an implementation on one of those?
> 
> In other words, yes, my mail macros screwed up the syntax, but they
> didn't change much.
> 
> > I'm sure we can all agree that this means the above usage (with the
> > two wandering brackets included) is correct ?
> 
> No, it's still wrong.

Oops, let me just delete that "no no no" mail that I nearly sent 
*blush*.  Of course it should be:

[[[[[cc]yy]mm]dd]HH]MM[.SS]

As we strip the brackets from the outside in, we get the right answer 
:-)  Thanks.

> Greg

-- 
Brian <brian@awfulhak.org>, <brian@freebsd.org>
      <http://www.awfulhak.org>;
Don't _EVER_ lose your sense of humour....





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708010327.EAA05954>