views:

121

answers:

2

I'm putting together an application that will require the recording of dates as far back as the BC range; can Core Data's date type handle this, or do I need to define another entity to properly record and format dates?

A: 

Perhaps this is useful, NSDate distantPast gives you:

0001-12-31 19:43:12 -041648

and NSDate distantFuture gives you:

4000-12-31 21:00:00 -0300
ariel
`distantPast` and `distantFuture` don't give the boundaries, they are just convenience methods for getting dates a long way into the future and a long way into the past.
Abizern
+3  A: 

NSDate works using NSTimeInterval which is a double.

always specified in seconds; it yields sub-millisecond precision over a range of 10,000 years.

I'm not going to work out how far back in time a double will go (order of +/- 10^300 seconds or so), but I think you will be safe to use it for the BC ranges. For example: 1,000 years is about 3x10^11 seconds.

Abizern
Definitely sounds like there isn't much to worry about. Thanks a lot!
Kaji