[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: date parsing on "bite-sized tasks" list

From: Tripp Lilley <tlilley_at_perspex.com>
Date: 2001-08-22 00:36:31 CEST

On Tue, 21 Aug 2001, RADICS Peter wrote:

> well, ok, if somebody really wants them, let it be turned on from an .rc
> file or somesuch, but please use a simple, unambigous date format by
> default, and then, why not a standard one like the above.

Personally, I've used the "interesting" (ie: context-sensitive, ambiguous)
forms like "yesterday" and so forth in scripts. Specifically, I use them
in cron jobs. For instance, I have a job that runs late Sunday night to
prepare data for a Wednesday deadline. In order to do its job, it needs to
know what day it's preparing data for, so I tell it "next wednesday at
midnight", which Date::Manip eats up and handles correctly.

On the flipside, I also see real value in being able to specify a date in
a canonical form that is independant of any monkery performed by a user
running my script (ie: their locale settings, etc.). So I'd like to be
able to tell svn, *on* the command line, that I'm specifying my dates in
this canonical form. Actually, I'd like to be able to tell it how I'm
specifying each date.

So perhaps a "good" solution might be:

        1) use ISO as the default

        2) allow users to specify particular settings in configuration.
           Those settings might be "use my locale" or "use this locale" or
           "use this heuristic", etc.

        3) allow a user / script / whatever to explicitly specify *how* to
           parse the date at entry time, to eliminate ambiguity by
           specifying the parsing context along with the data.

For number 3, I can see prepending some sort of tag to the date that would
inform the parser how to proceed:

        --some_date="FREEFORM [TZ=UTC]: next wednesday at midnight"
        --some_date="LC_ISO: 2001-08-22 00:00:00"
        --some_date="LC_US: 8/22/2001"

and so on (I'm not suggesting this form in particular, just the concept).

-- 
   Tripp Lilley  *  http://stargate.eheart.sg505.net/~tlilley/
--------------------------------------------------------------------------
   "The human soul is the greatest anti-piracy measure in the known
    world, but no major company will use it."
   <http://slashdot.org/comments.pl?sid=01/07/19/007240&cid=94>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:36 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.