chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] POSIX unit and string->time


From: John Cowan
Subject: Re: [Chicken-users] POSIX unit and string->time
Date: Thu, 15 Aug 2013 16:02:35 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

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   address@hidden    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]