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

Re: [PATCH]: Re: Date processing should be more flexible

From: Christopher Ness <chris_at_nesser.org>
Date: 2005-07-06 17:05:30 CEST

On Wed, 2005-07-06 at 12:52 +0200, Norbert Unterberg wrote:
> 2005/7/6, Christopher Ness <chris@nesser.org>:
> > No, not yet. This patch adds the ability to accept -r{2005-7-1}
> >
> > I didn't read up on the date ISO standard but would assume this is a
> > valid ISO date without the leading zeros.
>
> Actually, it is not. The ISO standard relies on the number of digits,
> however, the number of components can change:
>
> 2005-03-05: March 5, 2005
> 2005-03: March 2005
> 2005-003: January 3, 2005 (day #3 of 2005)
> 2005-W03 Week #3 in 2005
>
> The dash is optional, so 2005-03-05=20050305, 2005-03=200503,
> 2005003=2005003 and 2005-W03=2005W03.
>
> See also: http://www.cl.cam.ac.uk/~mgk25/iso-time.html

Norbert,

I researched the standard and feel that we should relax the requirement
to include all digits in the Month and Day fields in our date parser.
This only applies for a date with separators (currently dashes).

I conclude the reason that all digits are required in ISO 8601 is for
sorting dates. Seeing as we are not sorting dates but are asking for
input from the user I think this is a valid relaxation of the standard.

I'm sure others will disagree. But for those that do, this does not
take away the strict ISO 8601 formats, but relaxes _ONLY_ the month and
day inputs to not require a leading digit iff it will be zero.

I feel this is a more user friendly approach.

I'll look over my patch today and see if it is valid for this case. I'd
also like to add a test case for a "zero day" to the patch to stop a
regression if this is accepted.

Cheers,
Chris

-- 
Wireless Group,
McMaster University
finger.localdomain
10:57:24 up 1 day, 55 min, 1 user, load average: 0.00, 0.01, 0.00
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 6 17:12:00 2005

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.