What is the (best) way to handle dates before Christ in C#/.NET?

前端 未结 3 913
失恋的感觉
失恋的感觉 2020-12-11 00:59

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

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-11 01:04

    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.

提交回复
热议问题