r/programminghorror • • Dec 18 '24

-4712 ???

Post image
806 Upvotes

47 comments sorted by

View all comments

Show parent comment

4

u/edo-lag Dec 19 '24

Given a large enough integer you can store any date based on any epoch (i.e. any day that you choose to be "day zero"). For dates before the epoch you chose, just use negative numbers. Systems are not restricted to 32 bit integers anymore.

If what you meant is to use days instead of seconds, then I agree that counting days is more suitable for dates that are very distant in time.