Claude Marinier scripsit:

> The string->time function in the POSIX unit seems to think that
> 2013-06-31 is a Monday. Is it being accomodating and flexible? I
> expected it to complain because June has only thirty days. I was
> planning to use it as a sanity check for dates passed into a function.

The underlying strptime() Posix system call does not do
a validity check between the month and the day, only that
the month number is [1,12] and the day number is [1,31].  See
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html>
for details.

-- 
John Cowan   [email protected]    http://ccil.org/~cowan
If a soldier is asked why he kills people who have done him no harm, or a
terrorist why he kills innocent people with his bombs, they can always
reply that war has been declared, and there are no innocent people in an
enemy country in wartime.  The answer is psychotic, but it is the answer
that humanity has given to every act of aggression in history.  --Northrop Frye

_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to