コード例 #1
0
        /// <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));
        }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
 /// <summary>
 /// Get Date UT from Julian Day
 /// </summary>
 public DateUT DateUT(JulianDay jd)
 {
     return(SweDate.JulianDayToDate(jd.Value, jd.Calendar));
 }
コード例 #4
0
 /// <summary>
 /// Get Date UT from Ephemeris Time
 /// </summary>
 public DateUT DateUT(EphemerisTime et)
 {
     return(SweDate.JulianDayToDate(et.JulianDay.Value, et.JulianDay.Calendar));
 }
コード例 #5
0
 /// <summary>
 /// Returns the DateUT of this Julian Day
 /// </summary>
 public DateUT ToDateUT()
 {
     return(SweDate.JulianDayToDate(Value, Calendar));
 }