This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug time/20265] strptime("....-00-1", "%Y-%W-%w") produces results that are off by a month (or 13 months for leap years)


https://sourceware.org/bugzilla/show_bug.cgi?id=20265

Jason Holland <jester13rok at yahoo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jester13rok at yahoo dot com

--- Comment #1 from Jason Holland <jester13rok at yahoo dot com> ---
I can confirm it is a bug, I'm specifically creating tm struct and noticed that
the December 31 1904 converts to 364 and December 31 1905 converts to 365.  For
the person implementing the fix please be aware certain centuries are not a
leap year,

from wikipedia:
In the Gregorian calendar every year that is divisible by 400 is due to be an
end-of-century leap year (often called a century leap year), with the
intercalation of February 29 yielding 366 days instead of 365. End-of-century
years that are not divisible by 400 are common years (with 365 days) and not
leap years

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]