Пример #1
0
 /// <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)
                ));
 }
Пример #2
0
 /// <summary>
 /// Create a Julian Day
 /// </summary>
 public JulianDay JulianDay(DateUT date, DateCalendar?calendar = null)
 {
     return(new JulianDay(date, calendar));
 }
Пример #3
0
 /// <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));
 }
Пример #4
0
 /// <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);
 }