Gossamer Forum
Home : Products : DBMan : Customization :

is DBMan's date routines - Y2K ready?

Quote Reply
is DBMan's date routines - Y2K ready?
does anyone know if DBMan's date routines are Y2K ready?
TimRyan
Quote Reply
Re: is DBMan's date routines - Y2K ready? In reply to
Yes. DBMan is completely Y2K compliant.

Many people are concerned about the code in sub get_date:

Code:
$year = $year + 1900;

No need to be, though. In Unix (and probably NT, Windows and Macs), the $year value is the number of years since 1900. This year, the value is 99, so "$year = $year + 1900" results in 1999. Next year, the value will be 100, so "$year = $year + 1900" results in 2000.

There are some scripts which just tacked on a "19" in front of the year value like this:

$year = "19" . $year;

The result is the same this year, but next year the result would be

19100

Not good! Smile

So, yes, DBMan is completely Y2K compliant.


------------------
JPD