Is there a constant for "end of time"?
Posted
by
Nick Rosencrantz
on Programmers
See other posts from Programmers
or by Nick Rosencrantz
Published on 2012-09-14T07:13:29Z
Indexed on
2012/09/14
15:48 UTC
Read the original article
Hit count: 383
For some systems, the time value 9999-12-31 is used as the "end of time" as the end of the time that the computer can calculate. But what if it changes? Wouldn't it be better to define this time as a builtin variable?
In C and other programming languages there usually is a variable such as MAX_INT
or similar to get the largest value an integer could have. Why is there not a similar function for MAX_TIME
i.e. set the variable to the "end of time" which for many systems usually is 9999-12-31. To avoid the problem of hardcoding to a wrong year (9999) could these systems introduce a variable for the "end of time"?
© Programmers or respective owner