/// <summary> /// Returns the net amount of time for this effective duty period that occurs since the specified UTC DateTime and UTCNow. /// </summary> /// <param name="dtStart">The specified earliest date</param> /// <returns></returns> public TimeSpan DutyTimeSince(DateTime dtStart) { return(DateTime.UtcNow.EarlierDate(EffectiveDutyEnd).Subtract(EffectiveDutyStart.LaterDate(dtStart))); }
public override string ToString() { return(String.Format(CultureInfo.CurrentCulture, "{0}-{1} ({2})", EffectiveDutyStart.UTCFormattedStringOrEmpty(false), EffectiveDutyEnd.UTCFormattedStringOrEmpty(false), Specification.ToString())); }