public static DayTimeDurationValue Sub(TimeValue tm1, TimeValue tm2) { return new DayTimeDurationValue(tm1.Value - tm2.Value); }
public Proxy(TimeValue value) { _value = value; }
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)); }