views:

108

answers:

1

I'm working on a project now that will require me to enable users to store negative-dates in the database. These dates have the potential to span many thousands of years BC, and as late as 'Today.' I've worked on many projects that stored dates, but they were all relatively-recent dates, and none of them were ever negative (BC).

What types of things should I take into considering when working with this type of data? I'm fully aware of the many calendar-shifts that have taken place in history, but I will be working with the modern calendar and not worrying too much about doing conversions. However, any information about conversions would be greatly appreciated as it is a very relevant topic, and one that I am academically interested in although not required to focus on during this project.

Update: I'll be story YYYY-MM-DD (That format isn't required)

+1  A: 

How precise does your storage need to be? Is it years, days, or hours/minutes. If you are only looking at Days or Years, then maybe you don't need to actually store the Date, but rather an Offset of +/- Day/Years from your 0 Date

Paul Farry
Year, Month, Day, Hours, Minutes
Jonathan Sampson
Ended up going with individual fields for year (int), month (int), and day (int). Modified by period (1 = AD, 0 = BC).
Jonathan Sampson