tags:

views:

429

answers:

2

Is there any built-in support for that? And if not, is there any consensus about handling such dates?


Links to owncoded solutions, or fragments of it, are very welcome.

+4  A: 

If you're referring the handling of DateTime values < DateTime.MinValue, then I think the only "consensus" is to not use System.DateTime to try to represent them.

Any consensus would likely exist only within a community that does work with such dates. What is the area in which you are working? Astronomy?


Whatever the area of interest, there are likely to be others who have experienced this same problem. I'd do some research first, especially if your dates will ever need to interoperate with other software in this same area of interest. Even if you have to code your own, you can at least become aware of the issues that others have had in coding their own.

John Saunders
No, not Astronomy. Rather history.
Peter
Didn't suspect history; you didn't say "BCE".
John Saunders
Or just use them relative to an epoch that you define externally.
Marc Gravell
as far as the remark goes : true enough.
Peter
+6  A: 

There is no built in support for dates in this range so you will have to code your own.

Here is an example http://blog.cogworks.co.uk/2009/03/representing-large-ad-and-bc-dates-in-c.html

AdamRalph
I will code my own, Im afraid. just checkin here to see I'm not missing out on sth. readily present.
Peter
tx for the code location too, but i'm afraid it doesn't suit my needs. Other links very welcome.
Peter