/// <summary> /// Convert a DateUT to a Julian Day /// </summary> /// <param name="date">Date to convert</param> /// <returns>The Julian Day</returns> public static double DateToJulianDay(DateUT date) { return(DateToJulianDay( date.Year, date.Month, date.Day, date.Hours, date.Minutes, date.Seconds, GetCalendar(date.Year, date.Month, date.Day) )); }
/// <summary> /// Create a Julian Day /// </summary> public JulianDay JulianDay(DateUT date, DateCalendar?calendar = null) { return(new JulianDay(date, calendar)); }
/// <summary> /// Convert a DateUT to a Julian Day /// </summary> /// <param name="date">Date to convert</param> /// <param name="calendar">Calendar to use</param> /// <returns>The Julian Day</returns> public static double DateToJulianDay(DateUT date, DateCalendar calendar) { return(DateToJulianDay(date.Year, date.Month, date.Day, date.Hours, date.Minutes, date.Seconds, calendar)); }
/// <summary> /// Create a new Julian Day from a DateUT /// </summary> /// <param name="date">Date source</param> /// <param name="calendar">Calendar source</param> public JulianDay(DateUT date, DateCalendar?calendar = null) : this() { this.Calendar = calendar ?? SweDate.GetCalendar(date.Year, date.Month, date.Day); this.Value = SweDate.DateToJulianDay(date, this.Calendar); }