[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: Norbert Unterberg <nunterberg_at_gmail.com>
Date: 2005-07-05 08:14:22 CEST

2005/7/5, Christer J. Nyfält <christer.nyfalt@welho.com>:

> /* Range validation, allowing for leap seconds */
> if (expt.tm_mon < 0 || expt.tm_mon > 11
> || expt.tm_mday > valid_days_by_month[expt.tm_mon]
> + || expt.tm_mday <= 0
...

Your are stricter than ANSI-C in your date validation. The ANSI-C
function mktime() normalizes the date/time values in a meaningful
manner before using the fields, so a January 32 is nicely converted
into a February 1 (the apr_time_exp_gmt_get function seems to do the
same). This which can be quite nice when you calculate dates from a
script ("tomorrow" is just the "day of today+1", no need to check the
overflow).
Is this stricter-than-ANSI parsing intentional?

Norbert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 5 08:17:07 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.