From owner-freebsd-hackers Thu Jul 31 21:21:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id VAA24898 for hackers-outgoing; Thu, 31 Jul 1997 21:21:19 -0700 (PDT) Received: from hwcn.org (main.hwcn.org [199.212.94.65]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id VAA24888 for ; Thu, 31 Jul 1997 21:21:14 -0700 (PDT) Received: from james.freenet.hamilton.on.ca (ac199@james.hwcn.org [199.212.94.66]) by hwcn.org (8.8.6/8.8.6) with ESMTP id AAA01912; Fri, 1 Aug 1997 00:21:20 -0400 (EDT) Received: from localhost (ac199@localhost) by james.freenet.hamilton.on.ca (8.8.6/8.8.6) with SMTP id AAA06960; Fri, 1 Aug 1997 00:21:34 -0400 (EDT) X-Authentication-Warning: james.freenet.hamilton.on.ca: ac199 owned process doing -bs Date: Fri, 1 Aug 1997 00:21:33 -0400 (EDT) From: Tim Vanderhoek X-Sender: ac199@james.freenet.hamilton.on.ca To: Greg Lehey cc: Brian Somers , FreeBSD Hackers Subject: Re: date(1) In-Reply-To: <199708010208.LAA08172@freebie.lemis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, 1 Aug 1997, Greg Lehey wrote: > I think this confusion is making my point: the syntax is too > complicated. I understand the [...] to mean optional parts. In this > case, we have two unbalanced ]s: > > cc[yy[mm[dd[hh]]]]]mm[.ss]] > ^ ^ > | | I saw this later, too. It turns out that there should be two brackets preceding `cc'. That is a simple, normal, logical extension. > 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 I disagree. Calling on my experience as a newcomer, what was cryptic was the format used to print the date (eg. date ``+DATE: %m/%d/%y%nTIME: %H:%M:%S''). Once I realized that printing and setting the date were two different things, and that the syntax for setting the date was simply [[yy[mm[dd[hh]]]]mm[.ss]] It was very easy. However, before realizing this, I did get frustrated with the syntax. I wouldn't mind seeing the manpage simplified. > 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? Because POSIX specifies the proper format for date(1)? I don't know how much POSIX specifies, but I rather suspect some new arcane "user-friendly" entry format is outlawed. Of course, in the interest of script-portability, we should not extend date(1) at all. Anyone trying to enter the century should get an error. This is the whole purpose of Posix, to increase portability. By creating extensions to it, we defeat the whole purpose just for the sake of creating a better operating system. -- Outnumbered? Maybe. Outspoken? Never! tIM...HOEk