Esempio n. 1
0
 public static DayTimeDurationValue Sub(TimeValue tm1, TimeValue tm2)
 {
     return new DayTimeDurationValue(tm1.Value - tm2.Value);
 }
Esempio n. 2
0
 public Proxy(TimeValue value)
 {
     _value = value;
 }
Esempio n. 3
0
 public static TimeValue Add(TimeValue tm, DayTimeDurationValue duration)
 {
     DateTimeValue dat;
     if (tm.IsLocal)
         dat = new DateTimeValue(false, DateTime.Today, tm.Value.DateTime);
     else
         dat = new DateTimeValue(false, DateTime.Today, tm.Value.DateTime, tm.Value.Offset);
     DateTime dt = DateTimeValue.Add(dat, duration).Value.DateTime;
     DateTime today = DateTime.Today;
     dt = new DateTime(today.Year, today.Month, today.Day, dt.Hour, dt.Minute, dt.Second, dt.Millisecond);
     if (tm.IsLocal)
         return new TimeValue(dt);
     else
         return new TimeValue(new DateTimeOffset(dt, tm.Value.Offset));
 }