[英]Convert Julian Date and Time to DateTime in C# Micro Framework
I found code at https://stackoverflow.com/a/14554483/1082492 to convert a DateTime
to a Julian Date but I can't find code to reverse the process and even more importantly included the time of day. 我在https://stackoverflow.com/a/14554483/1082492上找到了将
DateTime
转换为儒略日期的代码,但是我找不到代码来逆转该过程,更重要的是包括了一天中的时间。 I'm trying to do this in the .NET Micro Framework so what I can use is much more limited. 我正在尝试在.NET Micro Framework中执行此操作,因此我可以使用的功能受到更多限制。
Using NodaTime allows you to convert an Instant to Julian Date by inst.ToJulianDate(); 使用NodaTime可以通过inst.ToJulianDate();将Instant转换为Julian Date。 conversely converting a Julian Date to an Instant jd.FromJulianDate().
相反地,将儒略日期转换为Instant jd.FromJulianDate()。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.