public static AdjustPeriod ( System.DateTime &start, System.DateTime &end ) : void | ||
start | System.DateTime | 시작 시각 |
end | System.DateTime | 완료 시각 |
Résultat | void |
/// <summary> /// 생성자 /// </summary> /// <param name="start">시작일자</param> /// <param name="duration">시간 간격</param> /// <param name="isReadOnly">읽기 전용 여부</param> protected TimePeriodBase(DateTime start, TimeSpan duration, bool isReadOnly) { TimeTool.AdjustPeriod(ref start, ref duration); _start = start; Duration = duration; IsReadOnly = isReadOnly; }
/// <summary> /// 생성자 /// </summary> /// <param name="start">시작 일자</param> /// <param name="end">완료 일자</param> /// <param name="isReadOnly">읽기 전용 여부</param> protected TimePeriodBase(DateTime?start, DateTime?end, bool isReadOnly) { TimeTool.AdjustPeriod(ref start, ref end); _start = start ?? TimeSpec.MinPeriodTime; _end = end ?? TimeSpec.MaxPeriodTime; IsReadOnly = isReadOnly; }
/// <summary> /// 기간을 설정합니다. /// </summary> /// <param name="newStart">설정할 시작 시각</param> /// <param name="newEnd">설정할 완료 시각</param> public virtual void Setup(DateTime?newStart, DateTime?newEnd) { if (IsDebugEnabled) { log.Debug("기간을 새로 설정합니다. newStart=[{0}], newEnd=[{1}]", newStart, newEnd); } AssertMutable(); TimeTool.AdjustPeriod(ref newStart, ref newEnd); _start = newStart.GetValueOrDefault(TimeSpec.MinPeriodTime); _end = newEnd.GetValueOrDefault(TimeSpec.MaxPeriodTime); }