How to handle dates < 1970 and > 2037?
Posted on 2003-10-31
I use PHP's date() function to handle dates in Unix timestamp format. However, the date function has an inherited limitation of supporting only dates from 1970 to 2037 (1900 to 2037 if in non-windows environment).
This posses a serious limitation to the language. A range of 1970 to 2037 is simply too short to store dates. For instance, you can't use it to store dates of birth. And by using it store dates before 1970 (by using negative values), you are risking your code for not being able to run in windows platform. PHP codes, afterall are meant to run-one run-all.
So, is there any workaround for this? Such as a date() replacement?