Exemplo n.º 1
0
        /// <summary>
        /// Sub offset
        /// </summary>
        public static UniversalTime operator -(UniversalTime date, TimeSpan offset)
        {
            var jd = SweDate.DateToJulianDay(date, DateCalendar.Gregorian);

            jd -= offset.TotalDays;
            return(SweDate.JulianDayToDate(jd, DateCalendar.Gregorian));
        }
Exemplo n.º 2
0
        /// <summary>
        /// New date from components
        /// </summary>
        public UniversalTime(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);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Returns the DateUT of this Julian Day
 /// </summary>
 public UniversalTime ToDateUT()
 {
     return(SweDate.JulianDayToDate(Value, Calendar));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Get Date UT from Ephemeris Time
 /// </summary>
 public UniversalTime DateUT(EphemerisTime et)
 {
     return(SweDate.JulianDayToDate(et.JulianDay.Value, et.JulianDay.Calendar));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Get Date UT from Julian Day
 /// </summary>
 public UniversalTime DateUT(JulianDay jd)
 {
     return(SweDate.JulianDayToDate(jd.Value, jd.Calendar));
 }