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

RFC: date parser rewrite

From: mark benedetto king <mbk_at_lowlatency.com>
Date: 2003-12-14 20:37:57 CET

The exiting bison-based date-parser suffers from several deficiencies,
among which are the following:

  1.) it is bison-based, which complicates the build and release processes,
      especially for Windows.
  2.) it parses an extremely large set of possible date formats, sometimes
      in surprising and counterintuitive ways.
  3.) it is complex enough to discourage maintainance and enhancement
  4.) it does not support ISO 8601 date formats.
  5.) it it not perfectly MP-safe
  6.) it is a bit of an eyesore.

If we are to replace it, we must do so before 1.0 so that its replacement
will not be forced to support a superset of its behaviour.

I propose the following implementation strategy (this is loosely based
on work from C. Scott Ananian <cananian@lesser-magoo.lcs.mit.edu>, available
at http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=6093):

The current local time and current UTC time must be passed to the date

Take the first match amongst:

1.) the following ISO 8601 extended date-time formats:


Where "TZI" stands for "Time Zone Indicator", and can be one of:


2.) the following ISO 8601 basic date-time formats:


Where "TZI" stands for "Time Zone Indicator", and can be one of:


3.) the following formats, which will be adjusted to UTC from local time.


4.) the following formats, which are presumed to reference midnight
    local time of the specified day.


5.) the following formats, which are presumed to reference local time
  of the current day.


I believe that these formats are necessary and sufficient for the 1.0
release. The merits of more complex specifications, such as "two
fortnights ago", "four score and seven minutes hence", and "the Ides of
March in the most recent Chinese year of the dragon" can be discussed

Note: the existing book references several date formats that are
not supported in this proposal. Those references would need to be


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 14 20:38:24 2003

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.