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.
"B.C." stands for "before Christ." The system labels years based on a traditional notion of when Jesus was born — with the "A.D." denoting years after his birth and "B.C." designating the years that predate his birth. In English, it is common for "A.D." to precede the year, so that the translation of "A.D.
Furthermore, as described in section 2.14, our year reckoning was established by Dionysius Exiguus in the 6th century. Dionysius let the year C.E. 1 start one week after what he believed to be Jesus' birthday.
There is no built in support for dates in this range so you will have to code your own.
Here is an example http://flipbit.co.uk/2009/03/representing-large-ad-and-bc-dates-in-c.html.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With