JulianConversionsGetDate_FromJulian_Epoch1970 Method
Returns date from Julian based on epoch 1970
Meeus ch. 7
Namespace: CoordinateSharpAssembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
public static DateTime? GetDate_FromJulian_Epoch1970(
double j
)
- j Double
- Julian date (epoch 1970)
NullableDateTimeDateTime
The Gregorian calendar (started in 1582) contains different leap year rules than the Julian calendar. To avoid exceptions, any invalid pre-1582 Gregorian leap year conversions of
February 29th will shift to March 1st. As such you may see two consecutive Julian to Gregorian conversions produce a date of March 1st on rare occasions.
double jul = 17896.5;
DateTime? date = JulianConversions.GetDate_FromJulian_Epoch1970(jul);
Console.WriteLine(date); //1/1/2019 12:00:00 AM