Versatile/Robust Timestamp

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MythX
Forum Commoner
Posts: 28
Joined: Mon Jan 11, 2010 8:28 pm

Versatile/Robust Timestamp

Post by MythX »

I have begun a project that will track events in history. These events may have happened yesterday, or back in the days of the dinosaurs. Obviously functions like strtotime() and date() aren't going to work across the board. I have thought about storing all dates within varchar fields and then writing some functions of my own to handle dates such as: 1/1/1901at 2:01pm to 4.5 billion years ago. I was wondering if anyone has already invented the wheel though. If not, I'd be happy to do so and post my work for everyone else. Also, if anyone has any ideas on how to proceed with this, I would appreciate the help.

Thanks

Jason
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Versatile/Robust Timestamp

Post by John Cartwright »

That certainly sounds like an interesting challenge, but impossible to make accurate (considering calenders have evolved, Julian, Gregorian, etc).

See http://askville.amazon.com/Long-ago-mil ... d=29657107 for a good explanation on why this is difficult.
Post Reply