Birthday calculation notes

I am using php and for date calculation I am using the mktime function and it depends upon the machine. PHP on my 32 bit machine maxes out at 2,417,674,447. I would have expected it to max out at 2e31-1 or 2,147,483,647 so who knows?

The server I am running on allows numbers up to 9223372036854775807 (64 bit integer) - which is pretty big.

The mktime functions works in seconds, so if a calculation goes over 9223372036854775807 it chokes. Instead of that I will print out an error message. Besides, no one will live that long for *those* date calculations.

Just so you can see how big they are...
2,417,674,447
9,223,372,036,854,775,807

main page   |   rtfm consulting   |   other page

September 18, 2010