deane.rothenma...@walgreens.com wrote:
>First, why does the value for $mm start at zero for January?

Historical reasons.  The underlying C library API (struct tm) was defined
that way, and these Perl APIs are just copies of the C library functions.

>Second, why is $yy returned as "the number of years since 1900"?

Again, that's part of struct tm.  Originally a sane space-saving idea,
in that you could get a useful range of years-since-1900 into one byte,
whereas useful year-AD values take two bytes.  Of course, nowadays
we're not concerned about saving the odd byte, and don't save one here,
so the 1900 offset is just an inconvenience.  And historically a lot
of programmers in the 20th century were misled into thinking that the
number was year-AD-modulo-100, which was indeed a source of Y2K bugs.

-zefram

Reply via email to