C# Class NSoft.NFramework.TimePeriods.TimeTool

Show file Open project: debop/NFramework Class Usage Examples

Public Properties

Property Type Description
UnixEpoch System.DateTime

Public Methods

Method Description
AddDays ( this day, int days ) : DayOfWeek

요일 계산을 수행한다.

AddHalfyear ( this startHalfyearKind, int count ) : YearAndHalfyear
AddHalfyear ( this startHalfyearKind, int startYear, int count ) : YearAndHalfyear
AddHalfyear ( HalfyearKind startHalfyearKind, int count, int &year, HalfyearKind &halfyear ) : void
AddHalfyear ( int startYear, HalfyearKind startHalfyearKind, int count, int &year, HalfyearKind &halfyear ) : void
AddMonth ( int startYear, int startMonth, int count ) : YearAndMonth
AddMonth ( this startMonth, int count ) : YearAndMonth
AddMonth ( int startMonth, int count, int &year, int &month ) : void
AddMonth ( int startYear, int startMonth, int count, int &year, int &month ) : void
AddQuarter ( this startQuarter, int count ) : YearAndQuarter
AddQuarter ( this startQuarter, int startYear, int count ) : YearAndQuarter
AddQuarter ( QuarterKind startQuarter, int startYear, int count, int &year, QuarterKind &quarter ) : void
AddQuarter ( this startQuarter, int count, int &year, QuarterKind &quarter ) : void
AdjustPeriod ( System.DateTime &start, System.DateTime &end ) : void

기간의 시작 시각과 완료 시각을 순서대로 정렬합니다.

AdjustPeriod ( System.DateTime &start, System.TimeSpan &duration ) : void

duration의 부호가 Minus(-) 이면, start 시간을 duration만큼 앞으로 이동하고, duration 값을 양수로 변경한다.

Ago ( this from, System.DateTime targetMoment ) : System.DateTime

targetMomentfrom을 뺀 DateTime를 반환한다.

AllItemsAreEqual ( this left, IEnumerable right ) : bool

leftright 시퀀스의 요소들이 모두 같은 지를 판단합니다.

AsString ( this period ) : string

period를 문자열로 표현합니다.

AssertMutable ( this period ) : void

period가 수정 가능한가 를 검사합니다. (읽기 전용이면 InvalidOperationException 예외를 발생시킵니다)

AssertValidPeriod ( System.DateTime start, System.DateTime end ) : void

기간의 시작 일자가 완료 일자보다 선행되어야 합니다.

Combine ( this datePart, System.DateTime timePart ) : System.DateTime

datePart의 날짜부분과, timePart의 시간부분을 합친다.

CurrentHalfyear ( this yearStartMonth ) : System.DateTime

현재 날짜가 속한 반기의 시작 일자를 나타냅니다. 단 한해의 시작 월이 yearStartMonth을 기준으로 합니다.

CurrentQuarter ( this yearStartMonth ) : System.DateTime

현재 날짜가 속한 분기의 시작 일자를 나타냅니다. 단 한해의 시작 월이 yearStartMonth을 기준으로 합니다.

CurrentWeek ( ) : System.DateTime

현재 날짜가 속한 주(Week)의 시작 일자를 나타냅니다.

CurrentWeek ( this culture ) : System.DateTime

현재 날짜가 속한 주(Week)의 시작 일자를 나타냅니다. 지정된 문화권에 따른 한주의 시작 요일을 기준으로 한다.

CurrentYear ( this yearStartMonth ) : System.DateTime

yearStartMonth를 한 해의 시작월로하는 한해의 시작일자를 표현합니다.

DayStart ( this dateTime ) : System.DateTime
EndMonthOfHalfyear ( this half ) : int
EndMonthOfQuarter ( this quarter ) : int

해당 분기의 마지막 월

EndOfLastQuarter ( this current ) : System.DateTime

전(前) 분기의 마지막 시각

EndTimeOfDay ( this moment ) : System.DateTime

현재 일의 마지막 시각

EndTimeOfHalfyear ( this year, HalfyearKind halfyearKind, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime
EndTimeOfHalfyear ( this dateTime, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 반기의 종료일을 반환합니다.

EndTimeOfHour ( this dateTime ) : System.DateTime
EndTimeOfLastMonth ( this current ) : System.DateTime

전(前)월의 마지막 시각

EndTimeOfLastWeek ( this current ) : System.DateTime

전(前) 주의 마지막 시각

EndTimeOfLastYear ( this current ) : System.DateTime

전년도 마지막 시각

EndTimeOfMinute ( this dateTime ) : System.DateTime
EndTimeOfMonth ( this moment ) : System.DateTime

moment이 속한 월의 완료일을 구합니다.

EndTimeOfMonth ( this year, MonthKind month ) : System.DateTime

해당 년, 월의 마지막 시각

EndTimeOfMonth ( this year, int month ) : System.DateTime

해당 년, 월의 마지막 시각

EndTimeOfQuarter ( this year, QuarterKind quarter, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime

지정한 년도, 분기의 완료 시각

EndTimeOfQuarter ( this dateTime, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 분기의 종료일을 반환합니다.

EndTimeOfSecond ( this dateTime ) : System.DateTime
EndTimeOfWeek ( this dateTime ) : System.DateTime

dateTime이 속한 주(Week)의 첫째 날을 반환합니다.

EndTimeOfWeek ( this time, CultureInfo culture ) : System.DateTime

지정된 날짜가 속한 주(week)의 첫번째 요일 (예:일요일)의 날짜

EndTimeOfWeek ( this time, DayOfWeek firstDayOfWeek ) : System.DateTime

지정된 날짜가 속한 주(week)의 마지막 날짜 (한국:토요일, ISO8601:일요일)

EndTimeOfYear ( this dateTime, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 년의 마지막 일을 반환합니다.

From ( this from, System.DateTime targetMoment ) : System.DateTime

지정된 일자에 TimeSpan을 더한 날짜를 반환한다.

FromNow ( this from ) : System.DateTime

현재 날짜에 지정된 TimeSpan을 더한 날짜를 반환한다.

GetDatePart ( this moment ) : System.DateTime

지정한 DateTime 에서 시각부분을 뺀 일자만을 반환합니다.

GetDayRange ( this moment, ITimeCalendar timeCalendar = null ) : DayRange

moment가 속한 하루의 기간을 반환합니다 (1일)

GetDayRanges ( this moment, int dayCount, ITimeCalendar timeCalendar = null ) : DayRangeCollection

moment가 속한 하루서부터 dayCount만큼의 일자의 기간

GetDaysInMonth ( this year, int month ) : int
GetHalfyearOfMonth ( int yearMonth ) : HalfyearKind
GetHalfyearOfMonth ( int yearBaseMonth, int yearMonth ) : HalfyearKind
GetHalfyearRange ( this moment, ITimeCalendar timeCalendar = null ) : HalfyearRange

moment가 속한 분기의 전체 기간 (5월이면, 1월1일 ~ 6월30일)

GetHalfyearRanges ( this moment, int halfyearCount, ITimeCalendar timeCalendar = null ) : HalfyearRangeCollection

moment가 속한 분기부터 halfyearCount만큼의 분기

GetHourRange ( this moment, ITimeCalendar timeCalendar = null ) : HourRange

moment가 속한 시간의 기간을 반환합니다 (1시간)

GetHourRanges ( this moment, int hourCount, ITimeCalendar timeCalendar = null ) : HourRangeCollection

moment가 속한 하루서부터 hourCount만큼의 시간의 기간

GetIntersectionBlock ( this period, ITimePeriod target ) : TimeBlock

두 기간의 공통되는 기간을 반환한다. (교집합)

GetIntersectionRange ( this period, ITimePeriod target ) : TimeRange

두 기간의 공통되는 기간을 반환한다. (교집합)

GetMinuteRange ( this moment, ITimeCalendar timeCalendar = null ) : MinuteRange

moment가 속한 분의 기간을 반환합니다 (1분)

GetMinuteRanges ( this moment, int minuteCount, ITimeCalendar timeCalendar = null ) : MinuteRangeCollection

moment가 속한 하루서부터 minuteCount만큼의 분의 기간

GetMonthRange ( this moment, ITimeCalendar timeCalendar = null ) : MonthRange

moment가 속한 월의 전체 기간 (5월이면 5월1일~5월31일)

GetMonthRanges ( this moment, int monthCount, ITimeCalendar timeCalendar = null ) : MonthRangeCollection

moment가 속한 월로부터 monthCount 만큼의 기간

GetMonthsOfHalfyear ( this halfyear ) : int[]
GetMonthsOfQuarter ( this quarter ) : int[]
GetPeriodOf ( this moment, PeriodKind periodKind ) : ITimePeriod

moment이 속하면서, periodKind에 해당하는 ITimePeriod을 구합니다.

GetPeriodOf ( this moment, PeriodKind periodKind, ITimeCalendar timeCalendar ) : ITimePeriod

moment이 속하면서, periodKind에 해당하는 ITimePeriod을 반환합니다.

GetPeriodsOf ( this moment, PeriodKind periodKind, int periodCount ) : ICalendarTimeRange

moment이 속하면서, periodKind에 해당하는 ICalendarTimeRange을 구합니다.

GetPeriodsOf ( this moment, PeriodKind periodKind, int periodCount, ITimeCalendar timeCalendar ) : ICalendarTimeRange

moment이 속하면서, periodKind에 해당하는 ICalendarTimeRange을 구합니다.

GetQuarterOfMonth ( int yearMonth ) : QuarterKind
GetQuarterOfMonth ( int yearBaseMonth, int yearMonth ) : QuarterKind
GetQuarterRange ( this moment, ITimeCalendar timeCalendar = null ) : QuarterRange

moment가 속한 분기의 전체 기간 (5월이면 4월1일부터 6월30일까지)

GetQuarterRanges ( this moment, int quarterCount, ITimeCalendar timeCalendar = null ) : QuarterRangeCollection

moment가 속한 분기부터 quarterCount 갯수의 분기까지의 기간

GetRelativeDayPeriod ( this start, int days ) : TimeRange

start부터 상대적으로 days 일수 만큼의 기간

GetRelativeHourPeriod ( this start, int hours ) : TimeRange

start부터 상대적으로 hours 시간수 만큼의 기간

GetRelativeMinutePeriod ( this start, int minutes ) : TimeRange

start부터 상대적으로 minutes 분수 만큼의 기간

GetRelativeMonthPeriod ( this start, int months ) : TimeRange

start부터 상대적으로 months 개월수 만큼의 기간

GetRelativeSecondPeriod ( this start, int seconds ) : TimeRange

start부터 상대적으로 seconds 초수 만큼의 기간

GetRelativeWeekPeriod ( this start, int weeks ) : TimeRange

start부터 상대적으로 weeks 주수 만큼의 기간

GetRelativeYearPeriod ( this start, int years ) : TimeRange

start부터 상대적으로 years 년수 만큼의 기간

GetReleation ( this period, ITimePeriod target ) : PeriodRelation

periodtarget과의 시간 축으로 선 후행 관계를 판단합니다.

GetStartOfWeek ( this time, DayOfWeek firstDayOfWeek ) : System.DateTime
GetStartOfYearWeek ( int year, int weekOfYear, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, WeekOfYearRuleKind weekOfYearRuleKind ) : System.DateTime
GetStartOfYearWeek ( int year, int weekOfYear, CultureInfo culture, WeekOfYearRuleKind weekOfYearRuleKind ) : System.DateTime
GetTimeBlock ( this start, System.DateTime end ) : TimeBlock

start ~ end 시각을 기간으로 하는 시간 범위를 빌드합니다.

GetTimeBlock ( this start, System.TimeSpan duration ) : TimeBlock

start를 시작 시각으로 duration 만큼의 기간을 가지는 시간 범위를 빌드합니다.

GetTimePart ( this moment ) : System.TimeSpan

지정한 DateTime 에서 시각부분만을 반환합니다.

GetTimeRange ( this start, System.DateTime end ) : TimeRange

start ~ end 시각을 기간으로 하는 시간 범위를 빌드합니다.

GetTimeRange ( this start, System.TimeSpan duration ) : TimeRange

start를 시작 시각으로 duration 만큼의 기간을 가지는 시간 범위를 빌드합니다.

GetUnionBlock ( this period, ITimePeriod target ) : TimeBlock

두 기간의 합집합 기간을 반환한다.

GetUnionRange ( this period, ITimePeriod target ) : TimeRange

두 기간의 합집합 기간을 반환한다.

GetWeekOfYear ( this moment, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, WeekOfYearRuleKind weekOfYearRule ) : YearAndWeek
GetWeekOfYear ( this moment, CultureInfo culture, WeekOfYearRuleKind weekOfYearRule ) : YearAndWeek
GetWeekOfYear ( this moment, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, WeekOfYearRuleKind weekOfYearRule, int &year, int &weekOfYear ) : void
GetWeekOfYear ( this moment, CultureInfo culture, WeekOfYearRuleKind weekOfYearRule, int &year, int &weekOfYear ) : void
GetWeekRange ( this moment, ITimeCalendar timeCalendar = null ) : WeekRange

moment가 속한 한주의 기간을 반환합니다.

GetWeekRanges ( this moment, int weekCount, ITimeCalendar timeCalendar = null ) : WeekRangeCollection

moment가 속한 주에서 weekCount만큼의 주의 기간

GetWeeksOfYear ( int year, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, WeekOfYearRuleKind weekOfYearRuleKind ) : int
GetWeeksOfYear ( int year, CultureInfo culture, WeekOfYearRuleKind weekOfYearRuleKind ) : int
GetYearOf ( int yearBaseMonth, int year, int month ) : int
GetYearOf ( this calendar, System.DateTime moment ) : int

지정된 Calendar 기준으로 moment가 속한 년도를 구한다.

GetYearOf ( this moment, int yearBaseMonth ) : int

moment 가 속한 년도를 반환한다.

GetYearRange ( this moment, ITimeCalendar timeCalendar = null ) : YearRange

moment가 속한 년의 전체 기간

GetYearRanges ( this moment, int yearCount, ITimeCalendar timeCalendar = null ) : YearRangeCollection

moment가 속한 년과 yearCount 만큼의 기간

HalfyearOf ( this month ) : HalfyearKind
HasDatePart ( this moment ) : bool

날짜에 DatePart의 값을 가지는가?

HasInside ( this period, System.DateTime target ) : bool

기간안에 대상 시각이 포함되는지 여부

HasInside ( this period, ITimePeriod target ) : bool

현 기간 안에 대상 기간이 포함되는지 여부

HasTimePart ( this dateTime ) : bool

하루중 시간 부분이 존재하면 참을 반환합니다.

IntersectsWith ( this period, ITimePeriod target ) : bool

두 기간 교차하거나, periodtarget 의 내부 구간이면 true를 반환합니다.

IsAnytime ( this period ) : bool

기간이 정해지지 않은 TimePeriod인지 파악합니다. (Start와 End가 모두 Null)

IsNotAnytime ( this period ) : bool

기간이 정해지지 않은 TimePeriod가 아닌지 파악합니다. (시작시각 또는 완료시각이 지정되어 있으면 됩니다)

IsSameDateTime ( this left, System.DateTime right ) : bool

두 일자가 같은 값을 가지는지 판단합니다.

IsSameDay ( this left, System.DateTime right ) : bool

두 DateTime 값이 일(Day) 단위까지 같은지 판단합니다.

IsSameHalfyear ( this left, System.DateTime right, int yearBaseMonth = TimeSpec.CalendarYearStartMonth ) : bool

두 DateTime 값이 반기(Half Year) 단위까지 같은지 판단합니다.

IsSameHour ( this left, System.DateTime right ) : bool

두 DateTime 값이 시간(Hour) 단위까지 같은지 판단합니다.

IsSameMinute ( this left, System.DateTime right ) : bool

두 DateTime 값이 분(Minute) 단위까지 같은지 판단합니다.

IsSameMonth ( this left, System.DateTime right ) : bool

두 DateTime 값이 월(Month) 단위까지 같은지 판단합니다.

IsSameQuarter ( this left, System.DateTime right, int yearBaseMonth = TimeSpec.CalendarYearStartMonth ) : bool

두 DateTime 값이 분기(Quarter) 단위까지 같은지 판단합니다.

IsSameSecond ( this left, System.DateTime right ) : bool

두 DateTime 값이 초(Second) 단위까지 같은지 판단합니다.

IsSameTime ( this left, System.DateTime right, PeriodKind periodKind ) : bool

두 날짜 값이 periodKind 단위까지 같은지 판단합니다.

IsSameWeek ( this left, System.DateTime right, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, WeekOfYearRuleKind weekOfYearRuleKind ) : bool

두 DateTime 값이 주(Week) 단위까지 같은지 판단합니다.

IsSameWeek ( this left, System.DateTime right, CultureInfo culture, WeekOfYearRuleKind weekOfYearRuleKind ) : bool

두 DateTime 값이 주(Week) 단위까지 같은지 판단합니다.

IsSameYear ( this left, System.DateTime right, int yearBaseMonth = TimeSpec.CalendarYearStartMonth ) : bool

두 DateTime 값이 년(Year) 단위까지 같은지 판단합니다.

IsWeekDay ( this dayOfWeek ) : bool

요일이 주중인가?

IsWeekEnd ( this dayOfWeek ) : bool

요일이 주말인가?

LastQuarterOf ( this date ) : QuarterKind

지정된 날짜의 분기의 앞의 분기를 구한다.

Max ( System.DateTime a, System.DateTime b ) : System.DateTime

두 일자 중 최대 일자를 구한다.

Max ( System.DateTime a, System.DateTime b ) : DateTime?

두 일자 중 최대 일자를 구한다.

Max ( System.TimeSpan a, System.TimeSpan b ) : System.TimeSpan

두 시간 간격 중 큰 값을 반환한다.

Min ( System.DateTime a, System.DateTime b ) : System.DateTime

두 일자 중 최소 일자를 구한다.

Min ( System.DateTime a, System.DateTime b ) : DateTime?

두 일자 중 최소 일자를 구한다.

Min ( System.TimeSpan a, System.TimeSpan b ) : System.TimeSpan

두 시간 간격 중 작은 값을 반환한다.

NextDay ( this day ) : DayOfWeek

다음 요일

NextDayOfWeek ( this current ) : System.DateTime

현재 날짜로부터 가장 가까운 지정된 요일을 반환한다.

NextDayOfWeek ( this current, DayOfWeek dow ) : System.DateTime

현재 날짜로부터 가장 가까운 지정된 요일을 반환한다.

NextHalfyear ( HalfyearKind startHalfyearKind ) : YearAndHalfyear
NextHalfyear ( HalfyearKind startHalfyearKind, int &year, HalfyearKind &halfyear ) : void
NextMonth ( this startMonth ) : YearAndMonth
NextMonth ( this startMonth, int &year, int &month ) : void
NextQuarter ( this startQuarterKind ) : YearAndQuarter
NextQuarter ( this startQuarterKind, int &year, QuarterKind &quarter ) : void
Noon ( this moment ) : System.DateTime

지정된 날짜의 정오를 가르키는 시간을 만든다.

OverlapsWith ( this period, ITimePeriod target ) : bool

두 기간이 겹치는 구간이 있는지 파악합니다.

PrevDayOfWeek ( this current ) : System.DateTime

현재 날짜로 지난 날짜 중에 가장 가까운 지정된 요일을 반환한다.

PrevDayOfWeek ( this current, DayOfWeek dow ) : System.DateTime

현재 날짜로 지난 날짜 중에 가장 가까운 지정된 요일을 반환한다.

PreviousDay ( this day ) : DayOfWeek

이전 요일

PreviousHalfyear ( HalfyearKind startHalfyearKind ) : YearAndHalfyear
PreviousHalfyear ( HalfyearKind startHalfyearKind, int &year, HalfyearKind &halfyear ) : void
PreviousMonth ( this startMonth ) : YearAndMonth
PreviousMonth ( int startMonth, int &year, int &month ) : void
PreviousQuarter ( this startQuarter ) : YearAndQuarter
PreviousQuarter ( this startQuarter, int &year, QuarterKind &quarter ) : void
QuarterOf ( this month ) : QuarterKind

지정된 월이 속한 분기

SetDatePart ( this moment, System.DateTime datePart ) : System.DateTime

의 날짜부분을 의 날짜부분으로 설정합니다.

SetDatePart ( this moment, int year, int month = 1, int day = 1 ) : System.DateTime

지정된 날짜의 년, 월, 일을 새로 설정한다. Time Part는 그대로

SetDay ( this moment, int day ) : System.DateTime

DateTime의 일만 지정된 일로 바꾼다.

SetHour ( this moment, int hour ) : System.DateTime

날짜의 시간(Hour)을 설정한다. 나머지 부분은 그대로 둡니다.

SetMillisecond ( this date, int millisecond ) : System.DateTime

날짜의 밀리초(Millisecond)을 설정한다. 나머지 부분은 그대로 둡니다.

SetMinute ( this moment, int minute ) : System.DateTime

날짜의 분(Minute)을 설정한다. 나머지 부분은 그대로 둡니다.

SetMonth ( this moment, int month ) : System.DateTime

DateTime의 월만 지정된 월로 바꾼다.

SetSecond ( this date, int second ) : System.DateTime

날짜의 초(Second)을 설정한다. 나머지 부분은 그대로 둡니다.

SetTimePart ( this moment, System.DateTime timepart ) : System.DateTime

moment의 시간 부분을 timepart의 시간부분으로 설정합니다.

SetTimePart ( this moment, System.TimeSpan timepart ) : System.DateTime

moment의 시간 부분을 timepart 값으로 설정합니다.

SetTimePart ( this moment, int hour, int minute, int second, int millisecond ) : System.DateTime

날짜의 시간 파트를 설정한다.

SetYear ( this moment, int year ) : System.DateTime

DateTime의 년도를 지정된 값으로 설정한다.

Since ( this from, System.DateTime targetMoment ) : System.DateTime

targetMomentfrom을 더한 DateTime를 반환한다. From과 같다.

StartMonthOfHalfyear ( this half ) : int
StartMonthOfQuarter ( this quarter ) : int

해당 분기의 시작월

StartOfLastQuarter ( this current ) : System.DateTime

전(前) 분기의 시작 시각

StartTimeOfDay ( this moment ) : System.DateTime

현재 일의 시작 시각

StartTimeOfHalfyear ( this year, HalfyearKind halfyearKind, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime
StartTimeOfHalfyear ( this dateTime, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 반기의 시작일을 반환합니다.

StartTimeOfHour ( this dateTime ) : System.DateTime
StartTimeOfLastMonth ( this current ) : System.DateTime

전(前)월의 시작 시각

StartTimeOfLastWeek ( this current ) : System.DateTime

전(前) 주(week)의 시작 시각

StartTimeOfLastYear ( this current ) : System.DateTime

전년도 시작 시각

StartTimeOfMinute ( this dateTime ) : System.DateTime
StartTimeOfMonth ( this moment ) : System.DateTime

moment이 속한 월의 시작일을 구합니다.

StartTimeOfMonth ( this year, MonthKind month ) : System.DateTime

해당 년, 월의 시작 시각

StartTimeOfMonth ( this year, int month ) : System.DateTime

해당 년, 월의 시작 시각

StartTimeOfQuarter ( this year, QuarterKind quarter, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime

지정한 년도, 분기의 시작 시각

StartTimeOfQuarter ( this dateTime, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 분기의 시작일을 반환합니다.

StartTimeOfSecond ( this dateTime ) : System.DateTime
StartTimeOfWeek ( this dateTime ) : System.DateTime

dateTime이 속한 주(Week)의 첫째 날을 반환합니다.

StartTimeOfWeek ( this time, CultureInfo culture ) : System.DateTime

지정된 날짜가 속한 주(week)의 첫번째 요일 (예:일요일)의 날짜

StartTimeOfWeek ( this time, DayOfWeek firstDayOfWeek ) : System.DateTime

지정된 날짜가 속한 주(week)의 첫번째 요일 (예: 일요일)의 날짜

StartTimeOfYear ( this dateTime ) : System.DateTime

Calendar에 대해 dateTime이 속한 년의 시작일을 반환합니다.

StartTimeOfYear ( this dateTime, int yearStartMonth ) : System.DateTime

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 년의 시작일을 반환합니다.

ToDateTime ( this value ) : System.DateTime

DateTime 형식으로 변환한다. 실패시에는 new DateTime(0) 를 반환한다.

ToDateTime ( this value, System.DateTime defaultValue ) : System.DateTime

DateTime 형식으로 변환한다.

ToDateTime ( this value, Func defaultValueFactory ) : System.DateTime

value를 DateTime 수형으로 변환합니다.

ToSqlPrecision ( this moment ) : System.DateTime

.NET DateTime 을 SQL Server DateTime 수형의 정밀도로 표현합니다. (SQL Server의 DateTime의 정밀도가 좀 낮다)

TrimToDay ( this moment, int day = 1 ) : System.DateTime

moment가 속한 년, 월에 day 일의 날짜를 반환합니다.

TrimToHour ( this moment, int hour ) : System.DateTime

moment가 속한 날짜에서 hour 시간을 정하고, 그 이하는 0 으로 한다.

TrimToMillisecond ( this moment, int millisecond ) : System.DateTime

moment가 속한 날짜에서 millisecond 초을 정한다.

TrimToMinute ( this moment, int minute ) : System.DateTime

moment가 속한 날짜에서 minute 분을 정하고, 그 이하는 0 으로 한다.

TrimToMonth ( this moment, int month = TimeSpec.CalendarYearStartMonth ) : System.DateTime

moment가 속한 년도에 month월의 첫번째 날을 반환합니다.

TrimToSecond ( this moment, int second ) : System.DateTime

moment가 속한 날짜에서 second 초을 정하고, 그 이하는 0 으로 한다.

TrimToYear ( this moment ) : System.DateTime

Year 하위 단위를 시작값으로 설정합니다. 즉 지정한 날짜가 속한 년도의 첫번째 날짜 (StartTimeOfYear(System.DateTime) 와 같음)

Method Details

AddDays() public static method

요일 계산을 수행한다.
public static AddDays ( this day, int days ) : DayOfWeek
day this
days int
return DayOfWeek

AddHalfyear() public static method

public static AddHalfyear ( this startHalfyearKind, int count ) : YearAndHalfyear
startHalfyearKind this
count int
return YearAndHalfyear

AddHalfyear() public static method

public static AddHalfyear ( this startHalfyearKind, int startYear, int count ) : YearAndHalfyear
startHalfyearKind this
startYear int
count int
return YearAndHalfyear

AddHalfyear() public static method

public static AddHalfyear ( HalfyearKind startHalfyearKind, int count, int &year, HalfyearKind &halfyear ) : void
startHalfyearKind HalfyearKind
count int
year int
halfyear HalfyearKind
return void

AddHalfyear() public static method

public static AddHalfyear ( int startYear, HalfyearKind startHalfyearKind, int count, int &year, HalfyearKind &halfyear ) : void
startYear int
startHalfyearKind HalfyearKind
count int
year int
halfyear HalfyearKind
return void

AddMonth() public static method

public static AddMonth ( int startYear, int startMonth, int count ) : YearAndMonth
startYear int
startMonth int
count int
return YearAndMonth

AddMonth() public static method

public static AddMonth ( this startMonth, int count ) : YearAndMonth
startMonth this
count int
return YearAndMonth

AddMonth() public static method

public static AddMonth ( int startMonth, int count, int &year, int &month ) : void
startMonth int
count int
year int
month int
return void

AddMonth() public static method

public static AddMonth ( int startYear, int startMonth, int count, int &year, int &month ) : void
startYear int
startMonth int
count int
year int
month int
return void

AddQuarter() public static method

public static AddQuarter ( this startQuarter, int count ) : YearAndQuarter
startQuarter this
count int
return YearAndQuarter

AddQuarter() public static method

public static AddQuarter ( this startQuarter, int startYear, int count ) : YearAndQuarter
startQuarter this
startYear int
count int
return YearAndQuarter

AddQuarter() public static method

public static AddQuarter ( QuarterKind startQuarter, int startYear, int count, int &year, QuarterKind &quarter ) : void
startQuarter QuarterKind
startYear int
count int
year int
quarter QuarterKind
return void

AddQuarter() public static method

public static AddQuarter ( this startQuarter, int count, int &year, QuarterKind &quarter ) : void
startQuarter this
count int
year int
quarter QuarterKind
return void

AdjustPeriod() public static method

기간의 시작 시각과 완료 시각을 순서대로 정렬합니다.
public static AdjustPeriod ( System.DateTime &start, System.DateTime &end ) : void
start System.DateTime 시작 시각
end System.DateTime 완료 시각
return void

AdjustPeriod() public static method

duration의 부호가 Minus(-) 이면, start 시간을 duration만큼 앞으로 이동하고, duration 값을 양수로 변경한다.
public static AdjustPeriod ( System.DateTime &start, System.TimeSpan &duration ) : void
start System.DateTime 시작 시각
duration System.TimeSpan 시간 간격
return void

Ago() public static method

targetMomentfrom을 뺀 DateTime를 반환한다.
public static Ago ( this from, System.DateTime targetMoment ) : System.DateTime
from this 뺄 TimeSpan
targetMoment System.DateTime 대상 일자
return System.DateTime

AllItemsAreEqual() public static method

leftright 시퀀스의 요소들이 모두 같은 지를 판단합니다.
public static AllItemsAreEqual ( this left, IEnumerable right ) : bool
left this
right IEnumerable
return bool

AsString() public static method

period를 문자열로 표현합니다.
public static AsString ( this period ) : string
period this
return string

AssertMutable() public static method

period가 수정 가능한가 를 검사합니다. (읽기 전용이면 InvalidOperationException 예외를 발생시킵니다)
public static AssertMutable ( this period ) : void
period this
return void

AssertValidPeriod() public static method

기간의 시작 일자가 완료 일자보다 선행되어야 합니다.
public static AssertValidPeriod ( System.DateTime start, System.DateTime end ) : void
start System.DateTime
end System.DateTime
return void

Combine() public static method

datePart의 날짜부분과, timePart의 시간부분을 합친다.
public static Combine ( this datePart, System.DateTime timePart ) : System.DateTime
datePart this Date 정보만
timePart System.DateTime Time 정보만
return System.DateTime

CurrentHalfyear() public static method

현재 날짜가 속한 반기의 시작 일자를 나타냅니다. 단 한해의 시작 월이 yearStartMonth을 기준으로 합니다.
public static CurrentHalfyear ( this yearStartMonth ) : System.DateTime
yearStartMonth this
return System.DateTime

CurrentQuarter() public static method

현재 날짜가 속한 분기의 시작 일자를 나타냅니다. 단 한해의 시작 월이 yearStartMonth을 기준으로 합니다.
public static CurrentQuarter ( this yearStartMonth ) : System.DateTime
yearStartMonth this
return System.DateTime

CurrentWeek() public static method

현재 날짜가 속한 주(Week)의 시작 일자를 나타냅니다.
public static CurrentWeek ( ) : System.DateTime
return System.DateTime

CurrentWeek() public static method

현재 날짜가 속한 주(Week)의 시작 일자를 나타냅니다. 지정된 문화권에 따른 한주의 시작 요일을 기준으로 한다.
public static CurrentWeek ( this culture ) : System.DateTime
culture this
return System.DateTime

CurrentYear() public static method

yearStartMonth를 한 해의 시작월로하는 한해의 시작일자를 표현합니다.
public static CurrentYear ( this yearStartMonth ) : System.DateTime
yearStartMonth this
return System.DateTime

DayStart() public static method

public static DayStart ( this dateTime ) : System.DateTime
dateTime this
return System.DateTime

EndMonthOfHalfyear() public static method

public static EndMonthOfHalfyear ( this half ) : int
half this
return int

EndMonthOfQuarter() public static method

해당 분기의 마지막 월
public static EndMonthOfQuarter ( this quarter ) : int
quarter this 해당 분기
return int

EndOfLastQuarter() public static method

전(前) 분기의 마지막 시각
public static EndOfLastQuarter ( this current ) : System.DateTime
current this
return System.DateTime

EndTimeOfDay() public static method

현재 일의 마지막 시각
public static EndTimeOfDay ( this moment ) : System.DateTime
moment this
return System.DateTime

EndTimeOfHalfyear() public static method

public static EndTimeOfHalfyear ( this year, HalfyearKind halfyearKind, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime
year this
halfyearKind HalfyearKind
yearStartMonth int
return System.DateTime

EndTimeOfHalfyear() public static method

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 반기의 종료일을 반환합니다.
public static EndTimeOfHalfyear ( this dateTime, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime
dateTime this 검사 일자
yearStartMonth int 년도의 시작월(기본은 1)
return System.DateTime

EndTimeOfHour() public static method

public static EndTimeOfHour ( this dateTime ) : System.DateTime
dateTime this
return System.DateTime

EndTimeOfLastMonth() public static method

전(前)월의 마지막 시각
public static EndTimeOfLastMonth ( this current ) : System.DateTime
current this
return System.DateTime

EndTimeOfLastWeek() public static method

전(前) 주의 마지막 시각
public static EndTimeOfLastWeek ( this current ) : System.DateTime
current this
return System.DateTime

EndTimeOfLastYear() public static method

전년도 마지막 시각
public static EndTimeOfLastYear ( this current ) : System.DateTime
current this
return System.DateTime

EndTimeOfMinute() public static method

public static EndTimeOfMinute ( this dateTime ) : System.DateTime
dateTime this
return System.DateTime

EndTimeOfMonth() public static method

moment이 속한 월의 완료일을 구합니다.
public static EndTimeOfMonth ( this moment ) : System.DateTime
moment this
return System.DateTime

EndTimeOfMonth() public static method

해당 년, 월의 마지막 시각
public static EndTimeOfMonth ( this year, MonthKind month ) : System.DateTime
year this
month MonthKind
return System.DateTime

EndTimeOfMonth() public static method

해당 년, 월의 마지막 시각
public static EndTimeOfMonth ( this year, int month ) : System.DateTime
year this
month int
return System.DateTime

EndTimeOfQuarter() public static method

지정한 년도, 분기의 완료 시각
public static EndTimeOfQuarter ( this year, QuarterKind quarter, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime
year this
quarter QuarterKind
yearStartMonth int
return System.DateTime

EndTimeOfQuarter() public static method

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 분기의 종료일을 반환합니다.
public static EndTimeOfQuarter ( this dateTime, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime
dateTime this 검사 일자
yearStartMonth int 년도의 시작월(기본은 1)
return System.DateTime

EndTimeOfSecond() public static method

public static EndTimeOfSecond ( this dateTime ) : System.DateTime
dateTime this
return System.DateTime

EndTimeOfWeek() public static method

dateTime이 속한 주(Week)의 첫째 날을 반환합니다.
public static EndTimeOfWeek ( this dateTime ) : System.DateTime
dateTime this
return System.DateTime

EndTimeOfWeek() public static method

지정된 날짜가 속한 주(week)의 첫번째 요일 (예:일요일)의 날짜
public static EndTimeOfWeek ( this time, CultureInfo culture ) : System.DateTime
time this
culture CultureInfo
return System.DateTime

EndTimeOfWeek() public static method

지정된 날짜가 속한 주(week)의 마지막 날짜 (한국:토요일, ISO8601:일요일)
public static EndTimeOfWeek ( this time, DayOfWeek firstDayOfWeek ) : System.DateTime
time this
firstDayOfWeek DayOfWeek 한 주의 첫번째 요일
return System.DateTime

EndTimeOfYear() public static method

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 년의 마지막 일을 반환합니다.
public static EndTimeOfYear ( this dateTime, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime
dateTime this 검사 일자
yearStartMonth int 년도의 시작월(기본은 1)
return System.DateTime

From() public static method

지정된 일자에 TimeSpan을 더한 날짜를 반환한다.
public static From ( this from, System.DateTime targetMoment ) : System.DateTime
from this 더할 TimeSpan
targetMoment System.DateTime 대상 DateTime
return System.DateTime

FromNow() public static method

현재 날짜에 지정된 TimeSpan을 더한 날짜를 반환한다.
public static FromNow ( this from ) : System.DateTime
from this 더할 TimeSpan
return System.DateTime

GetDatePart() public static method

지정한 DateTime 에서 시각부분을 뺀 일자만을 반환합니다.
public static GetDatePart ( this moment ) : System.DateTime
moment this
return System.DateTime

GetDayRange() public static method

moment가 속한 하루의 기간을 반환합니다 (1일)
public static GetDayRange ( this moment, ITimeCalendar timeCalendar = null ) : DayRange
moment this
timeCalendar ITimeCalendar
return DayRange

GetDayRanges() public static method

moment가 속한 하루서부터 dayCount만큼의 일자의 기간
public static GetDayRanges ( this moment, int dayCount, ITimeCalendar timeCalendar = null ) : DayRangeCollection
moment this
dayCount int
timeCalendar ITimeCalendar
return DayRangeCollection

GetDaysInMonth() public static method

public static GetDaysInMonth ( this year, int month ) : int
year this
month int
return int

GetHalfyearOfMonth() public static method

public static GetHalfyearOfMonth ( int yearMonth ) : HalfyearKind
yearMonth int
return HalfyearKind

GetHalfyearOfMonth() public static method

public static GetHalfyearOfMonth ( int yearBaseMonth, int yearMonth ) : HalfyearKind
yearBaseMonth int
yearMonth int
return HalfyearKind

GetHalfyearRange() public static method

moment가 속한 분기의 전체 기간 (5월이면, 1월1일 ~ 6월30일)
public static GetHalfyearRange ( this moment, ITimeCalendar timeCalendar = null ) : HalfyearRange
moment this
timeCalendar ITimeCalendar
return HalfyearRange

GetHalfyearRanges() public static method

moment가 속한 분기부터 halfyearCount만큼의 분기
public static GetHalfyearRanges ( this moment, int halfyearCount, ITimeCalendar timeCalendar = null ) : HalfyearRangeCollection
moment this
halfyearCount int
timeCalendar ITimeCalendar
return HalfyearRangeCollection

GetHourRange() public static method

moment가 속한 시간의 기간을 반환합니다 (1시간)
public static GetHourRange ( this moment, ITimeCalendar timeCalendar = null ) : HourRange
moment this
timeCalendar ITimeCalendar
return HourRange

GetHourRanges() public static method

moment가 속한 하루서부터 hourCount만큼의 시간의 기간
public static GetHourRanges ( this moment, int hourCount, ITimeCalendar timeCalendar = null ) : HourRangeCollection
moment this
hourCount int
timeCalendar ITimeCalendar
return HourRangeCollection

GetIntersectionBlock() public static method

두 기간의 공통되는 기간을 반환한다. (교집합)
public static GetIntersectionBlock ( this period, ITimePeriod target ) : TimeBlock
period this
target ITimePeriod
return TimeBlock

GetIntersectionRange() public static method

두 기간의 공통되는 기간을 반환한다. (교집합)
public static GetIntersectionRange ( this period, ITimePeriod target ) : TimeRange
period this
target ITimePeriod
return TimeRange

GetMinuteRange() public static method

moment가 속한 분의 기간을 반환합니다 (1분)
public static GetMinuteRange ( this moment, ITimeCalendar timeCalendar = null ) : MinuteRange
moment this
timeCalendar ITimeCalendar
return MinuteRange

GetMinuteRanges() public static method

moment가 속한 하루서부터 minuteCount만큼의 분의 기간
public static GetMinuteRanges ( this moment, int minuteCount, ITimeCalendar timeCalendar = null ) : MinuteRangeCollection
moment this
minuteCount int
timeCalendar ITimeCalendar
return MinuteRangeCollection

GetMonthRange() public static method

moment가 속한 월의 전체 기간 (5월이면 5월1일~5월31일)
public static GetMonthRange ( this moment, ITimeCalendar timeCalendar = null ) : MonthRange
moment this
timeCalendar ITimeCalendar
return MonthRange

GetMonthRanges() public static method

moment가 속한 월로부터 monthCount 만큼의 기간
public static GetMonthRanges ( this moment, int monthCount, ITimeCalendar timeCalendar = null ) : MonthRangeCollection
moment this
monthCount int
timeCalendar ITimeCalendar
return MonthRangeCollection

GetMonthsOfHalfyear() public static method

public static GetMonthsOfHalfyear ( this halfyear ) : int[]
halfyear this
return int[]

GetMonthsOfQuarter() public static method

public static GetMonthsOfQuarter ( this quarter ) : int[]
quarter this
return int[]

GetPeriodOf() public static method

moment이 속하면서, periodKind에 해당하는 ITimePeriod을 구합니다.
public static GetPeriodOf ( this moment, PeriodKind periodKind ) : ITimePeriod
moment this
periodKind PeriodKind
return ITimePeriod

GetPeriodOf() public static method

moment이 속하면서, periodKind에 해당하는 ITimePeriod을 반환합니다.
public static GetPeriodOf ( this moment, PeriodKind periodKind, ITimeCalendar timeCalendar ) : ITimePeriod
moment this
periodKind PeriodKind
timeCalendar ITimeCalendar
return ITimePeriod

GetPeriodsOf() public static method

moment이 속하면서, periodKind에 해당하는 ICalendarTimeRange을 구합니다.
public static GetPeriodsOf ( this moment, PeriodKind periodKind, int periodCount ) : ICalendarTimeRange
moment this
periodKind PeriodKind
periodCount int
return ICalendarTimeRange

GetPeriodsOf() public static method

moment이 속하면서, periodKind에 해당하는 ICalendarTimeRange을 구합니다.
public static GetPeriodsOf ( this moment, PeriodKind periodKind, int periodCount, ITimeCalendar timeCalendar ) : ICalendarTimeRange
moment this
periodKind PeriodKind
periodCount int
timeCalendar ITimeCalendar
return ICalendarTimeRange

GetQuarterOfMonth() public static method

public static GetQuarterOfMonth ( int yearMonth ) : QuarterKind
yearMonth int
return QuarterKind

GetQuarterOfMonth() public static method

public static GetQuarterOfMonth ( int yearBaseMonth, int yearMonth ) : QuarterKind
yearBaseMonth int
yearMonth int
return QuarterKind

GetQuarterRange() public static method

moment가 속한 분기의 전체 기간 (5월이면 4월1일부터 6월30일까지)
public static GetQuarterRange ( this moment, ITimeCalendar timeCalendar = null ) : QuarterRange
moment this
timeCalendar ITimeCalendar
return QuarterRange

GetQuarterRanges() public static method

moment가 속한 분기부터 quarterCount 갯수의 분기까지의 기간
public static GetQuarterRanges ( this moment, int quarterCount, ITimeCalendar timeCalendar = null ) : QuarterRangeCollection
moment this 기준 일자
quarterCount int 분기 수
timeCalendar ITimeCalendar 기준 TimeCalendar
return QuarterRangeCollection

GetRelativeDayPeriod() public static method

start부터 상대적으로 days 일수 만큼의 기간
public static GetRelativeDayPeriod ( this start, int days ) : TimeRange
start this 시작 시각
days int 시간 간격 (일수)
return TimeRange

GetRelativeHourPeriod() public static method

start부터 상대적으로 hours 시간수 만큼의 기간
public static GetRelativeHourPeriod ( this start, int hours ) : TimeRange
start this 시작 시각
hours int 시간 간격 (시간수)
return TimeRange

GetRelativeMinutePeriod() public static method

start부터 상대적으로 minutes 분수 만큼의 기간
public static GetRelativeMinutePeriod ( this start, int minutes ) : TimeRange
start this 시작 시각
minutes int 시간 간격 (분수)
return TimeRange

GetRelativeMonthPeriod() public static method

start부터 상대적으로 months 개월수 만큼의 기간
public static GetRelativeMonthPeriod ( this start, int months ) : TimeRange
start this 시작 시각
months int 시간 간격 (월수)
return TimeRange

GetRelativeSecondPeriod() public static method

start부터 상대적으로 seconds 초수 만큼의 기간
public static GetRelativeSecondPeriod ( this start, int seconds ) : TimeRange
start this 시작 시각
seconds int 시간 간격 (초수)
return TimeRange

GetRelativeWeekPeriod() public static method

start부터 상대적으로 weeks 주수 만큼의 기간
public static GetRelativeWeekPeriod ( this start, int weeks ) : TimeRange
start this 시작 시각
weeks int 시간 간격 (주수)
return TimeRange

GetRelativeYearPeriod() public static method

start부터 상대적으로 years 년수 만큼의 기간
public static GetRelativeYearPeriod ( this start, int years ) : TimeRange
start this 시작 시각
years int 시간 간격 (년수)
return TimeRange

GetReleation() public static method

periodtarget과의 시간 축으로 선 후행 관계를 판단합니다.
public static GetReleation ( this period, ITimePeriod target ) : PeriodRelation
period this
target ITimePeriod
return PeriodRelation

GetStartOfWeek() public static method

public static GetStartOfWeek ( this time, DayOfWeek firstDayOfWeek ) : System.DateTime
time this
firstDayOfWeek DayOfWeek
return System.DateTime

GetStartOfYearWeek() public static method

public static GetStartOfYearWeek ( int year, int weekOfYear, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, WeekOfYearRuleKind weekOfYearRuleKind ) : System.DateTime
year int
weekOfYear int
culture CultureInfo
weekRule CalendarWeekRule
firstDayOfWeek DayOfWeek
weekOfYearRuleKind WeekOfYearRuleKind
return System.DateTime

GetStartOfYearWeek() public static method

public static GetStartOfYearWeek ( int year, int weekOfYear, CultureInfo culture, WeekOfYearRuleKind weekOfYearRuleKind ) : System.DateTime
year int
weekOfYear int
culture CultureInfo
weekOfYearRuleKind WeekOfYearRuleKind
return System.DateTime

GetTimeBlock() public static method

start ~ end 시각을 기간으로 하는 시간 범위를 빌드합니다.
public static GetTimeBlock ( this start, System.DateTime end ) : TimeBlock
start this 시작시각
end System.DateTime 완료시각
return TimeBlock

GetTimeBlock() public static method

start를 시작 시각으로 duration 만큼의 기간을 가지는 시간 범위를 빌드합니다.
public static GetTimeBlock ( this start, System.TimeSpan duration ) : TimeBlock
start this 시작시각
duration System.TimeSpan 기간
return TimeBlock

GetTimePart() public static method

지정한 DateTime 에서 시각부분만을 반환합니다.
public static GetTimePart ( this moment ) : System.TimeSpan
moment this
return System.TimeSpan

GetTimeRange() public static method

start ~ end 시각을 기간으로 하는 시간 범위를 빌드합니다.
public static GetTimeRange ( this start, System.DateTime end ) : TimeRange
start this 시작시각
end System.DateTime 완료시각
return TimeRange

GetTimeRange() public static method

start를 시작 시각으로 duration 만큼의 기간을 가지는 시간 범위를 빌드합니다.
public static GetTimeRange ( this start, System.TimeSpan duration ) : TimeRange
start this 시작시각
duration System.TimeSpan 기간
return TimeRange

GetUnionBlock() public static method

두 기간의 합집합 기간을 반환한다.
public static GetUnionBlock ( this period, ITimePeriod target ) : TimeBlock
period this
target ITimePeriod
return TimeBlock

GetUnionRange() public static method

두 기간의 합집합 기간을 반환한다.
public static GetUnionRange ( this period, ITimePeriod target ) : TimeRange
period this
target ITimePeriod
return TimeRange

GetWeekOfYear() public static method

public static GetWeekOfYear ( this moment, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, WeekOfYearRuleKind weekOfYearRule ) : YearAndWeek
moment this
culture CultureInfo
weekRule CalendarWeekRule
firstDayOfWeek DayOfWeek
weekOfYearRule WeekOfYearRuleKind
return YearAndWeek

GetWeekOfYear() public static method

public static GetWeekOfYear ( this moment, CultureInfo culture, WeekOfYearRuleKind weekOfYearRule ) : YearAndWeek
moment this
culture CultureInfo
weekOfYearRule WeekOfYearRuleKind
return YearAndWeek

GetWeekOfYear() public static method

public static GetWeekOfYear ( this moment, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, WeekOfYearRuleKind weekOfYearRule, int &year, int &weekOfYear ) : void
moment this
culture CultureInfo
weekRule CalendarWeekRule
firstDayOfWeek DayOfWeek
weekOfYearRule WeekOfYearRuleKind
year int
weekOfYear int
return void

GetWeekOfYear() public static method

public static GetWeekOfYear ( this moment, CultureInfo culture, WeekOfYearRuleKind weekOfYearRule, int &year, int &weekOfYear ) : void
moment this
culture CultureInfo
weekOfYearRule WeekOfYearRuleKind
year int
weekOfYear int
return void

GetWeekRange() public static method

moment가 속한 한주의 기간을 반환합니다.
public static GetWeekRange ( this moment, ITimeCalendar timeCalendar = null ) : WeekRange
moment this
timeCalendar ITimeCalendar
return WeekRange

GetWeekRanges() public static method

moment가 속한 주에서 weekCount만큼의 주의 기간
public static GetWeekRanges ( this moment, int weekCount, ITimeCalendar timeCalendar = null ) : WeekRangeCollection
moment this
weekCount int
timeCalendar ITimeCalendar
return WeekRangeCollection

GetWeeksOfYear() public static method

public static GetWeeksOfYear ( int year, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, WeekOfYearRuleKind weekOfYearRuleKind ) : int
year int
culture CultureInfo
weekRule CalendarWeekRule
firstDayOfWeek DayOfWeek
weekOfYearRuleKind WeekOfYearRuleKind
return int

GetWeeksOfYear() public static method

public static GetWeeksOfYear ( int year, CultureInfo culture, WeekOfYearRuleKind weekOfYearRuleKind ) : int
year int
culture CultureInfo
weekOfYearRuleKind WeekOfYearRuleKind
return int

GetYearOf() public static method

public static GetYearOf ( int yearBaseMonth, int year, int month ) : int
yearBaseMonth int
year int
month int
return int

GetYearOf() public static method

지정된 Calendar 기준으로 moment가 속한 년도를 구한다.
public static GetYearOf ( this calendar, System.DateTime moment ) : int
calendar this
moment System.DateTime
return int

GetYearOf() public static method

moment 가 속한 년도를 반환한다.
public static GetYearOf ( this moment, int yearBaseMonth ) : int
moment this
yearBaseMonth int
return int

GetYearRange() public static method

moment가 속한 년의 전체 기간
public static GetYearRange ( this moment, ITimeCalendar timeCalendar = null ) : YearRange
moment this
timeCalendar ITimeCalendar
return YearRange

GetYearRanges() public static method

moment가 속한 년과 yearCount 만큼의 기간
public static GetYearRanges ( this moment, int yearCount, ITimeCalendar timeCalendar = null ) : YearRangeCollection
moment this
yearCount int
timeCalendar ITimeCalendar
return YearRangeCollection

HalfyearOf() public static method

public static HalfyearOf ( this month ) : HalfyearKind
month this
return HalfyearKind

HasDatePart() public static method

날짜에 DatePart의 값을 가지는가?
public static HasDatePart ( this moment ) : bool
moment this
return bool

HasInside() public static method

기간안에 대상 시각이 포함되는지 여부
public static HasInside ( this period, System.DateTime target ) : bool
period this 기간
target System.DateTime 대상 일자
return bool

HasInside() public static method

현 기간 안에 대상 기간이 포함되는지 여부
public static HasInside ( this period, ITimePeriod target ) : bool
period this
target ITimePeriod
return bool

HasTimePart() public static method

하루중 시간 부분이 존재하면 참을 반환합니다.
public static HasTimePart ( this dateTime ) : bool
dateTime this
return bool

IntersectsWith() public static method

두 기간 교차하거나, periodtarget 의 내부 구간이면 true를 반환합니다.
public static IntersectsWith ( this period, ITimePeriod target ) : bool
period this
target ITimePeriod
return bool

IsAnytime() public static method

기간이 정해지지 않은 TimePeriod인지 파악합니다. (Start와 End가 모두 Null)
public static IsAnytime ( this period ) : bool
period this
return bool

IsNotAnytime() public static method

기간이 정해지지 않은 TimePeriod가 아닌지 파악합니다. (시작시각 또는 완료시각이 지정되어 있으면 됩니다)
public static IsNotAnytime ( this period ) : bool
period this
return bool

IsSameDateTime() public static method

두 일자가 같은 값을 가지는지 판단합니다.
public static IsSameDateTime ( this left, System.DateTime right ) : bool
left this
right System.DateTime
return bool

IsSameDay() public static method

두 DateTime 값이 일(Day) 단위까지 같은지 판단합니다.
public static IsSameDay ( this left, System.DateTime right ) : bool
left this
right System.DateTime
return bool

IsSameHalfyear() public static method

두 DateTime 값이 반기(Half Year) 단위까지 같은지 판단합니다.
public static IsSameHalfyear ( this left, System.DateTime right, int yearBaseMonth = TimeSpec.CalendarYearStartMonth ) : bool
left this
right System.DateTime
yearBaseMonth int
return bool

IsSameHour() public static method

두 DateTime 값이 시간(Hour) 단위까지 같은지 판단합니다.
public static IsSameHour ( this left, System.DateTime right ) : bool
left this
right System.DateTime
return bool

IsSameMinute() public static method

두 DateTime 값이 분(Minute) 단위까지 같은지 판단합니다.
public static IsSameMinute ( this left, System.DateTime right ) : bool
left this
right System.DateTime
return bool

IsSameMonth() public static method

두 DateTime 값이 월(Month) 단위까지 같은지 판단합니다.
public static IsSameMonth ( this left, System.DateTime right ) : bool
left this
right System.DateTime
return bool

IsSameQuarter() public static method

두 DateTime 값이 분기(Quarter) 단위까지 같은지 판단합니다.
public static IsSameQuarter ( this left, System.DateTime right, int yearBaseMonth = TimeSpec.CalendarYearStartMonth ) : bool
left this
right System.DateTime
yearBaseMonth int
return bool

IsSameSecond() public static method

두 DateTime 값이 초(Second) 단위까지 같은지 판단합니다.
public static IsSameSecond ( this left, System.DateTime right ) : bool
left this
right System.DateTime
return bool

IsSameTime() public static method

두 날짜 값이 periodKind 단위까지 같은지 판단합니다.
public static IsSameTime ( this left, System.DateTime right, PeriodKind periodKind ) : bool
left this
right System.DateTime
periodKind PeriodKind
return bool

IsSameWeek() public static method

두 DateTime 값이 주(Week) 단위까지 같은지 판단합니다.
public static IsSameWeek ( this left, System.DateTime right, CultureInfo culture, CalendarWeekRule weekRule, DayOfWeek firstDayOfWeek, WeekOfYearRuleKind weekOfYearRuleKind ) : bool
left this
right System.DateTime
culture CultureInfo
weekRule CalendarWeekRule
firstDayOfWeek DayOfWeek
weekOfYearRuleKind WeekOfYearRuleKind
return bool

IsSameWeek() public static method

두 DateTime 값이 주(Week) 단위까지 같은지 판단합니다.
public static IsSameWeek ( this left, System.DateTime right, CultureInfo culture, WeekOfYearRuleKind weekOfYearRuleKind ) : bool
left this
right System.DateTime
culture CultureInfo
weekOfYearRuleKind WeekOfYearRuleKind
return bool

IsSameYear() public static method

두 DateTime 값이 년(Year) 단위까지 같은지 판단합니다.
public static IsSameYear ( this left, System.DateTime right, int yearBaseMonth = TimeSpec.CalendarYearStartMonth ) : bool
left this
right System.DateTime
yearBaseMonth int
return bool

IsWeekDay() public static method

요일이 주중인가?
public static IsWeekDay ( this dayOfWeek ) : bool
dayOfWeek this
return bool

IsWeekEnd() public static method

요일이 주말인가?
public static IsWeekEnd ( this dayOfWeek ) : bool
dayOfWeek this
return bool

LastQuarterOf() public static method

지정된 날짜의 분기의 앞의 분기를 구한다.
public static LastQuarterOf ( this date ) : QuarterKind
date this
return QuarterKind

Max() public static method

두 일자 중 최대 일자를 구한다.
public static Max ( System.DateTime a, System.DateTime b ) : System.DateTime
a System.DateTime
b System.DateTime
return System.DateTime

Max() public static method

두 일자 중 최대 일자를 구한다.
public static Max ( System.DateTime a, System.DateTime b ) : DateTime?
a System.DateTime
b System.DateTime
return DateTime?

Max() public static method

두 시간 간격 중 큰 값을 반환한다.
public static Max ( System.TimeSpan a, System.TimeSpan b ) : System.TimeSpan
a System.TimeSpan
b System.TimeSpan
return System.TimeSpan

Min() public static method

두 일자 중 최소 일자를 구한다.
public static Min ( System.DateTime a, System.DateTime b ) : System.DateTime
a System.DateTime
b System.DateTime
return System.DateTime

Min() public static method

두 일자 중 최소 일자를 구한다.
public static Min ( System.DateTime a, System.DateTime b ) : DateTime?
a System.DateTime
b System.DateTime
return DateTime?

Min() public static method

두 시간 간격 중 작은 값을 반환한다.
public static Min ( System.TimeSpan a, System.TimeSpan b ) : System.TimeSpan
a System.TimeSpan
b System.TimeSpan
return System.TimeSpan

NextDay() public static method

다음 요일
public static NextDay ( this day ) : DayOfWeek
day this
return DayOfWeek

NextDayOfWeek() public static method

현재 날짜로부터 가장 가까운 지정된 요일을 반환한다.
public static NextDayOfWeek ( this current ) : System.DateTime
current this
return System.DateTime

NextDayOfWeek() public static method

현재 날짜로부터 가장 가까운 지정된 요일을 반환한다.
public static NextDayOfWeek ( this current, DayOfWeek dow ) : System.DateTime
current this
dow DayOfWeek
return System.DateTime

NextHalfyear() public static method

public static NextHalfyear ( HalfyearKind startHalfyearKind ) : YearAndHalfyear
startHalfyearKind HalfyearKind
return YearAndHalfyear

NextHalfyear() public static method

public static NextHalfyear ( HalfyearKind startHalfyearKind, int &year, HalfyearKind &halfyear ) : void
startHalfyearKind HalfyearKind
year int
halfyear HalfyearKind
return void

NextMonth() public static method

public static NextMonth ( this startMonth ) : YearAndMonth
startMonth this
return YearAndMonth

NextMonth() public static method

public static NextMonth ( this startMonth, int &year, int &month ) : void
startMonth this
year int
month int
return void

NextQuarter() public static method

public static NextQuarter ( this startQuarterKind ) : YearAndQuarter
startQuarterKind this
return YearAndQuarter

NextQuarter() public static method

public static NextQuarter ( this startQuarterKind, int &year, QuarterKind &quarter ) : void
startQuarterKind this
year int
quarter QuarterKind
return void

Noon() public static method

지정된 날짜의 정오를 가르키는 시간을 만든다.
public static Noon ( this moment ) : System.DateTime
moment this 기준 DateTime
return System.DateTime

OverlapsWith() public static method

두 기간이 겹치는 구간이 있는지 파악합니다.
public static OverlapsWith ( this period, ITimePeriod target ) : bool
period this
target ITimePeriod
return bool

PrevDayOfWeek() public static method

현재 날짜로 지난 날짜 중에 가장 가까운 지정된 요일을 반환한다.
public static PrevDayOfWeek ( this current ) : System.DateTime
current this
return System.DateTime

PrevDayOfWeek() public static method

현재 날짜로 지난 날짜 중에 가장 가까운 지정된 요일을 반환한다.
public static PrevDayOfWeek ( this current, DayOfWeek dow ) : System.DateTime
current this
dow DayOfWeek
return System.DateTime

PreviousDay() public static method

이전 요일
public static PreviousDay ( this day ) : DayOfWeek
day this
return DayOfWeek

PreviousHalfyear() public static method

public static PreviousHalfyear ( HalfyearKind startHalfyearKind ) : YearAndHalfyear
startHalfyearKind HalfyearKind
return YearAndHalfyear

PreviousHalfyear() public static method

public static PreviousHalfyear ( HalfyearKind startHalfyearKind, int &year, HalfyearKind &halfyear ) : void
startHalfyearKind HalfyearKind
year int
halfyear HalfyearKind
return void

PreviousMonth() public static method

public static PreviousMonth ( this startMonth ) : YearAndMonth
startMonth this
return YearAndMonth

PreviousMonth() public static method

public static PreviousMonth ( int startMonth, int &year, int &month ) : void
startMonth int
year int
month int
return void

PreviousQuarter() public static method

public static PreviousQuarter ( this startQuarter ) : YearAndQuarter
startQuarter this
return YearAndQuarter

PreviousQuarter() public static method

public static PreviousQuarter ( this startQuarter, int &year, QuarterKind &quarter ) : void
startQuarter this
year int
quarter QuarterKind
return void

QuarterOf() public static method

지정된 월이 속한 분기
public static QuarterOf ( this month ) : QuarterKind
month this 조회할 월
return QuarterKind

SetDatePart() public static method

의 날짜부분을 의 날짜부분으로 설정합니다.
public static SetDatePart ( this moment, System.DateTime datePart ) : System.DateTime
moment this
datePart System.DateTime
return System.DateTime

SetDatePart() public static method

지정된 날짜의 년, 월, 일을 새로 설정한다. Time Part는 그대로
public static SetDatePart ( this moment, int year, int month = 1, int day = 1 ) : System.DateTime
moment this
year int
month int
day int
return System.DateTime

SetDay() public static method

DateTime의 일만 지정된 일로 바꾼다.
public static SetDay ( this moment, int day ) : System.DateTime
moment this
day int
return System.DateTime

SetHour() public static method

날짜의 시간(Hour)을 설정한다. 나머지 부분은 그대로 둡니다.
public static SetHour ( this moment, int hour ) : System.DateTime
moment this 대상 DateTime
hour int
return System.DateTime

SetMillisecond() public static method

날짜의 밀리초(Millisecond)을 설정한다. 나머지 부분은 그대로 둡니다.
public static SetMillisecond ( this date, int millisecond ) : System.DateTime
date this 대상 DateTime
millisecond int 밀리초
return System.DateTime

SetMinute() public static method

날짜의 분(Minute)을 설정한다. 나머지 부분은 그대로 둡니다.
public static SetMinute ( this moment, int minute ) : System.DateTime
moment this 대상 DateTime
minute int
return System.DateTime

SetMonth() public static method

DateTime의 월만 지정된 월로 바꾼다.
public static SetMonth ( this moment, int month ) : System.DateTime
moment this
month int
return System.DateTime

SetSecond() public static method

날짜의 초(Second)을 설정한다. 나머지 부분은 그대로 둡니다.
public static SetSecond ( this date, int second ) : System.DateTime
date this 대상 DateTime
second int
return System.DateTime

SetTimePart() public static method

moment의 시간 부분을 timepart의 시간부분으로 설정합니다.
public static SetTimePart ( this moment, System.DateTime timepart ) : System.DateTime
moment this
timepart System.DateTime
return System.DateTime

SetTimePart() public static method

moment의 시간 부분을 timepart 값으로 설정합니다.
public static SetTimePart ( this moment, System.TimeSpan timepart ) : System.DateTime
moment this
timepart System.TimeSpan
return System.DateTime

SetTimePart() public static method

날짜의 시간 파트를 설정한다.
public static SetTimePart ( this moment, int hour, int minute, int second, int millisecond ) : System.DateTime
moment this 설정할 DateTime
hour int
minute int
second int
millisecond int 밀리초
return System.DateTime

SetYear() public static method

DateTime의 년도를 지정된 값으로 설정한다.
public static SetYear ( this moment, int year ) : System.DateTime
moment this
year int
return System.DateTime

Since() public static method

targetMomentfrom을 더한 DateTime를 반환한다. From과 같다.
public static Since ( this from, System.DateTime targetMoment ) : System.DateTime
from this 더할 TimeSpan
targetMoment System.DateTime 대상 DateTime
return System.DateTime

StartMonthOfHalfyear() public static method

public static StartMonthOfHalfyear ( this half ) : int
half this
return int

StartMonthOfQuarter() public static method

해당 분기의 시작월
public static StartMonthOfQuarter ( this quarter ) : int
quarter this 해당 분기
return int

StartOfLastQuarter() public static method

전(前) 분기의 시작 시각
public static StartOfLastQuarter ( this current ) : System.DateTime
current this
return System.DateTime

StartTimeOfDay() public static method

현재 일의 시작 시각
public static StartTimeOfDay ( this moment ) : System.DateTime
moment this
return System.DateTime

StartTimeOfHalfyear() public static method

public static StartTimeOfHalfyear ( this year, HalfyearKind halfyearKind, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime
year this
halfyearKind HalfyearKind
yearStartMonth int
return System.DateTime

StartTimeOfHalfyear() public static method

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 반기의 시작일을 반환합니다.
public static StartTimeOfHalfyear ( this dateTime, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime
dateTime this 검사 일자
yearStartMonth int 년도의 시작월(기본은 1)
return System.DateTime

StartTimeOfHour() public static method

public static StartTimeOfHour ( this dateTime ) : System.DateTime
dateTime this
return System.DateTime

StartTimeOfLastMonth() public static method

전(前)월의 시작 시각
public static StartTimeOfLastMonth ( this current ) : System.DateTime
current this
return System.DateTime

StartTimeOfLastWeek() public static method

전(前) 주(week)의 시작 시각
public static StartTimeOfLastWeek ( this current ) : System.DateTime
current this
return System.DateTime

StartTimeOfLastYear() public static method

전년도 시작 시각
public static StartTimeOfLastYear ( this current ) : System.DateTime
current this
return System.DateTime

StartTimeOfMinute() public static method

public static StartTimeOfMinute ( this dateTime ) : System.DateTime
dateTime this
return System.DateTime

StartTimeOfMonth() public static method

moment이 속한 월의 시작일을 구합니다.
public static StartTimeOfMonth ( this moment ) : System.DateTime
moment this
return System.DateTime

StartTimeOfMonth() public static method

해당 년, 월의 시작 시각
public static StartTimeOfMonth ( this year, MonthKind month ) : System.DateTime
year this
month MonthKind
return System.DateTime

StartTimeOfMonth() public static method

해당 년, 월의 시작 시각
public static StartTimeOfMonth ( this year, int month ) : System.DateTime
year this
month int
return System.DateTime

StartTimeOfQuarter() public static method

지정한 년도, 분기의 시작 시각
public static StartTimeOfQuarter ( this year, QuarterKind quarter, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime
year this
quarter QuarterKind
yearStartMonth int
return System.DateTime

StartTimeOfQuarter() public static method

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 분기의 시작일을 반환합니다.
public static StartTimeOfQuarter ( this dateTime, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : System.DateTime
dateTime this 검사 일자
yearStartMonth int 년도의 시작월(기본은 1)
return System.DateTime

StartTimeOfSecond() public static method

public static StartTimeOfSecond ( this dateTime ) : System.DateTime
dateTime this
return System.DateTime

StartTimeOfWeek() public static method

dateTime이 속한 주(Week)의 첫째 날을 반환합니다.
public static StartTimeOfWeek ( this dateTime ) : System.DateTime
dateTime this
return System.DateTime

StartTimeOfWeek() public static method

지정된 날짜가 속한 주(week)의 첫번째 요일 (예:일요일)의 날짜
public static StartTimeOfWeek ( this time, CultureInfo culture ) : System.DateTime
time this
culture CultureInfo
return System.DateTime

StartTimeOfWeek() public static method

지정된 날짜가 속한 주(week)의 첫번째 요일 (예: 일요일)의 날짜
public static StartTimeOfWeek ( this time, DayOfWeek firstDayOfWeek ) : System.DateTime
time this 일자
firstDayOfWeek DayOfWeek 한 주의 첫번째 요일
return System.DateTime

StartTimeOfYear() public static method

Calendar에 대해 dateTime이 속한 년의 시작일을 반환합니다.
public static StartTimeOfYear ( this dateTime ) : System.DateTime
dateTime this 검사 일자
return System.DateTime

StartTimeOfYear() public static method

시작 월이 yearStartMonth인 Calendar에 대해 dateTime이 속한 년의 시작일을 반환합니다.
public static StartTimeOfYear ( this dateTime, int yearStartMonth ) : System.DateTime
dateTime this 검사 일자
yearStartMonth int 년도의 시작월(기본은 1)
return System.DateTime

ToDateTime() public static method

DateTime 형식으로 변환한다. 실패시에는 new DateTime(0) 를 반환한다.
public static ToDateTime ( this value ) : System.DateTime
value this 날짜를 나타내는 문자열
return System.DateTime

ToDateTime() public static method

DateTime 형식으로 변환한다.
public static ToDateTime ( this value, System.DateTime defaultValue ) : System.DateTime
value this 날짜를 나타내는 문자열
defaultValue System.DateTime 변환 실패시의 기본값
return System.DateTime

ToDateTime() public static method

value를 DateTime 수형으로 변환합니다.
public static ToDateTime ( this value, Func defaultValueFactory ) : System.DateTime
value this 변환할 문자열
defaultValueFactory Func 변환 실패 시 반환할 값을 제공하는 Factory
return System.DateTime

ToSqlPrecision() public static method

.NET DateTime 을 SQL Server DateTime 수형의 정밀도로 표현합니다. (SQL Server의 DateTime의 정밀도가 좀 낮다)
public static ToSqlPrecision ( this moment ) : System.DateTime
moment this
return System.DateTime

TrimToDay() public static method

moment가 속한 년, 월에 day 일의 날짜를 반환합니다.
public static TrimToDay ( this moment, int day = 1 ) : System.DateTime
moment this 기준 일자
day int 1 이상 해당 년/월의 최대일 이하여야 합니다.
return System.DateTime

TrimToHour() public static method

moment가 속한 날짜에서 hour 시간을 정하고, 그 이하는 0 으로 한다.
public static TrimToHour ( this moment, int hour ) : System.DateTime
moment this
hour int
return System.DateTime

TrimToMillisecond() public static method

moment가 속한 날짜에서 millisecond 초을 정한다.
public static TrimToMillisecond ( this moment, int millisecond ) : System.DateTime
moment this
millisecond int
return System.DateTime

TrimToMinute() public static method

moment가 속한 날짜에서 minute 분을 정하고, 그 이하는 0 으로 한다.
public static TrimToMinute ( this moment, int minute ) : System.DateTime
moment this
minute int
return System.DateTime

TrimToMonth() public static method

moment가 속한 년도에 month월의 첫번째 날을 반환합니다.
public static TrimToMonth ( this moment, int month = TimeSpec.CalendarYearStartMonth ) : System.DateTime
moment this
month int
return System.DateTime

TrimToSecond() public static method

moment가 속한 날짜에서 second 초을 정하고, 그 이하는 0 으로 한다.
public static TrimToSecond ( this moment, int second ) : System.DateTime
moment this
second int
return System.DateTime

TrimToYear() public static method

Year 하위 단위를 시작값으로 설정합니다. 즉 지정한 날짜가 속한 년도의 첫번째 날짜 (StartTimeOfYear(System.DateTime) 와 같음)
public static TrimToYear ( this moment ) : System.DateTime
moment this
return System.DateTime

Property Details

UnixEpoch public static property

Unix 시스템에서 최소시각으로 정한 일자 (1970-01-01)
public static DateTime,System UnixEpoch
return System.DateTime