Xref: utzoo alt.folklore.computers:12430 comp.unix.wizards:25846 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!crdgw1!uunet!stanford.edu!leland.Stanford.EDU!andar!cwitty From: cwitty@cs.Stanford.EDU (Carl Witty) Newsgroups: alt.folklore.computers,comp.unix.wizards Subject: Re: So, anyone got an imitation Multics 'memo' command? Message-ID: Date: 3 Jun 91 23:49:07 GMT References: <45901@cos.com> <1991May30.103104.24322@gdr.bath.ac.uk> Sender: news@leland.Stanford.EDU (Mr News) Organization: AIR, Stanford University Lines: 51 In <1991May30.103104.24322@gdr.bath.ac.uk> exspes@gdr.bath.ac.uk (P E Smee) writes: >In article <45901@cos.com> fetter@cos.UUCP (Bob Fetter) writes: >> Actually, a Unix implementation of convert_date_to_binary_ would IMHO >>be the most useful product of this type of effort. I would have to >>think, though, that someone, somewhere, has done this already. >> >> The usefulness of dealing with date/time strings like >> >> next friday at noon >> two weeks after easter >> tomorrow at 9pm >> >>would be nice. An "extention" to the Multics notation, though, would >>be negative times -- such as "last Thursday". I don't think (remember) >>the Multics routines handling negative offsets. Did it? The date parser included with the Andrew Message System, in .../ams/libs/ms/prsdate.y, handles all of the above dates (including "last Thursday"), except that it doesn't know about Easter--I tried "two weeks after christmas" instead. >Yep. In later incarnations it also knew about 'before' and 'after', so >(to pick an example from the manual) > Tuesday after Monday on or after 11/1 The parser in prsdate.y won't handle this (it doesn't know about "on or after"), but it does handle the equivalent "tuesday after monday after 10/31". If it annoys you to have to remember that October has 31 days, you could also use "tuesday after monday after day before 11/1". >is Election Day in the US -- i.e. the Tuesday after the first Monday >in November. The baroque > Tuesday after Monday on or after 11/1 -1 week That doesn't work. >would be the Tuesday before that, as would > Tuesday before Monday on or after 11/1 That does. (Except that "on or after" doesn't work.) So does "one week before tuesday after monday after day before 11/1". >'Easter -2 days' is Good Friday. >-- >Paul Smee, Computing Service, University of Bristol, Bristol BS8 1UD, UK > P.Smee@bristol.ac.uk - ..!uunet!ukc!bsmail!p.smee - Tel +44 272 303132