/// <summary> /// Sub offset /// </summary> public static DateUT operator -(DateUT date, TimeSpan offset) { var jd = SweDate.DateToJulianDay(date, DateCalendar.Gregorian); jd -= offset.TotalDays; return(SweDate.JulianDayToDate(jd, DateCalendar.Gregorian)); }
/// <summary> /// New date from components /// </summary> public DateUT(int year, int month, int day, double hour) : this() { var jd = SweDate.DateToJulianDay(year, month, day, hour, DateCalendar.Julian); SweDate.JulianDayToDate(jd, DateCalendar.Julian, out _Year, out _Month, out _Day, out _Hours, out _Minutes, out _Seconds); }
/// <summary> /// Get Date UT from Julian Day /// </summary> public DateUT DateUT(JulianDay jd) { return(SweDate.JulianDayToDate(jd.Value, jd.Calendar)); }
/// <summary> /// Get Date UT from Ephemeris Time /// </summary> public DateUT DateUT(EphemerisTime et) { return(SweDate.JulianDayToDate(et.JulianDay.Value, et.JulianDay.Calendar)); }
/// <summary> /// Returns the DateUT of this Julian Day /// </summary> public DateUT ToDateUT() { return(SweDate.JulianDayToDate(Value, Calendar)); }