C# Class NSoft.NFramework.TimePeriods.WeekTool

WeekOfYear 에 대한 Extension Methods 입니다. ref : http://www.simpleisbest.net/archive/2005/10/27/279.aspx ref : http://en.wikipedia.org/wiki/ISO_8601#Week_dates
CalendarWeekRule 값에 따라 WeekOfYear 가 결정된다. FirstDay : 1월1일이 포함된 주를 무조건 첫째 주로 삼는다. (우리나라, 미국 등의 기준) : .NET의 설정대로 하면 이렇게 된다. FirstForDayWeek : 1월1일이 포함된 주가 4일 이상인 경우에만 그 해의 첫 번째 주로 삼는다. (ISO 8601) 예) 한 주의 시작 요일이 일요일이고 1월1일이 일/월/화/수 중 하나이면 1월1일이 포함된 주는 해당 해의 첫 번째 주이다. 예) 한 주의 시작 요일이 일요일이고 1월1일이 목/금/토 중 하나이면 1월1일이 포함된 주는 해당 해의 첫 번째 주로 간주하지 않는다. 예) 2005년 1월 1일은 토요일이므로 1월1일이 포함된 주는 2005년의 첫 번째 주로 간주하지 않는다. FirstFullWeek : 1월의 첫 번째 주가 7일이 아니면 해당 해의 첫 번째 주로 삼지 않는다. 예) 한 주의 시작 요일이 일요일인 경우, 1월1일이 일요일이 아니라면 1월1일이 포함된 주는 해당 해의 첫 번째 주로 간주하지 않는다.
显示文件 Open project: debop/NFramework Class Usage Examples

Public Methods

Method Description
AddWeekOfYears ( this yearAndWeek, int weeks, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : YearAndWeek

yearAndWeekweeks만큼의 주차를 더한 주차를 계산합니다.

AddWeekOfYears ( this yearAndWeek, int weeks, ITimeCalendar timeCalendar ) : YearAndWeek

yearAndWeekweeks만큼의 주차를 더한 주차를 계산합니다.

GetCalendarWeekRule ( CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = null ) : CalendarWeekRule

주차 계산 룰과 문화권에 따른 주차 계산 룰을 구합니다.

GetCalendarWeekRuleAndFirstDayOfWeek ( CultureInfo culture, WeekOfYearRuleKind weekOfYearRule, CalendarWeekRule &weekRule, DayOfWeek &firstDayOfWeek ) : void

weekOfYearRule 에 따라 weekRulefirstDayOfWeek 를 결정합니다.

GetEndWeekRangeOfYear ( this year, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : WeekRange

해당 년도의 마지막 주차에 해당하는 기간을 WeekRange로 반환합니다.

GetEndWeekRangeOfYear ( this year, ITimeCalendar timeCalendar ) : WeekRange

해당 년도의 마지막 주차에 해당하는 기간을 WeekRange로 반환합니다.

GetEndYearAndWeek ( this year, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : YearAndWeek

해당 년도의 주차산정방식에 따라 마지막 주차를 산정합니다.

GetEndYearAndWeek ( this year, ITimeCalendar timeCalendar ) : YearAndWeek

해당 년도의 주차산정방식에 따라 마지막 주차를 산정합니다.

GetFirstDayOfWeek ( CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = null ) : DayOfWeek

주차 계산 룰과 문화권에 따른 한주의 첫번째 요일을 구합니다.

GetStartWeekRangeOfYear ( this year, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : WeekRange

해당 년도의 첫번째 주차에 해당하는 기간을 WeekRange로 반환합니다.

GetStartWeekRangeOfYear ( this year, ITimeCalendar timeCalendar ) : WeekRange

해당 년도의 첫번째 주차에 해당하는 기간을 WeekRange로 반환합니다.

GetWeekOfYearRuleKind ( CalendarWeekRule weekRule = null, DayOfWeek firstDayOfWeek = null ) : WeekOfYearRuleKind

weekRule, firstDayOfWeek에 해당하는 WeekOfYearRuleKind를 판단합니다.

GetWeekRange ( this yearAndWeek, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : WeekRange

yearAndWeek 주차에 해당하는 기간을 WeekRange 로 반환합니다. (예: 2011년 28주차의 실제 기간)

GetWeekRange ( this yearAndWeek, ITimeCalendar timeCalendar ) : WeekRange

yearAndWeek 주차에 해당하는 기간을 WeekRange 로 반환합니다. (예: 2011년 28주차의 실제 기간)

GetYearAndWeek ( this moment, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : YearAndWeek

해당일자의 주차를 구한다. 문화권(Culture) 및 새해 첫주차에 대한 정의에 따라 주차가 달라진다. ref : http://www.simpleisbest.net/archive/2005/10/27/279.aspx ref : http://en.wikipedia.org/wiki/ISO_8601#Week_dates

CalendarWeekRule 값에 따라 WeekOfYear 가 결정된다. FirstDay : 1월1일이 포함된 주를 무조건 첫째 주로 삼는다. (우리나라, 미국 등의 기준) : .NET의 설정대로 하면 이렇게 된다. FirstForDayWeek : 1월1일이 포함된 주가 4일 이상인 경우에만 그 해의 첫 번째 주로 삼는다. (ISO 8601) 예) 한 주의 시작 요일이 일요일이고 1월1일이 일/월/화/수 중 하나이면 1월1일이 포함된 주는 해당 해의 첫 번째 주이다. 예) 한 주의 시작 요일이 일요일이고 1월1일이 목/금/토 중 하나이면 1월1일이 포함된 주는 해당 해의 첫 번째 주로 간주하지 않는다. 예) 2005년 1월 1일은 토요일이므로 1월1일이 포함된 주는 2005년의 첫 번째 주로 간주하지 않는다. FirstFullWeek : 1월의 첫 번째 주가 7일이 아니면 해당 해의 첫 번째 주로 삼지 않는다. 예) 한 주의 시작 요일이 일요일인 경우, 1월1일이 일요일이 아니라면 1월1일이 포함된 주는 해당 해의 첫 번째 주로 간주하지 않는다.

GetYearAndWeek ( this moment, ITimeCalendar timeCalendar ) : YearAndWeek

해당일자의 주차를 구한다. 문화권(Culture) 및 새해 첫주차에 대한 정의에 따라 주차가 달라진다. ref : http://www.simpleisbest.net/archive/2005/10/27/279.aspx ref : http://en.wikipedia.org/wiki/ISO_8601#Week_dates

CalendarWeekRule 값에 따라 WeekOfYear 가 결정된다. FirstDay : 1월1일이 포함된 주를 무조건 첫째 주로 삼는다. (우리나라, 미국 등의 기준) : .NET의 설정대로 하면 이렇게 된다. FirstFourDayWeek : 1월1일이 포함된 주가 4일 이상인 경우에만 그 해의 첫 번째 주로 삼는다. (ISO 8601) 예) 한 주의 시작 요일이 일요일이고 1월1일이 일/월/화/수 중 하나이면 1월1일이 포함된 주는 해당 해의 첫 번째 주이다. 예) 한 주의 시작 요일이 일요일이고 1월1일이 목/금/토 중 하나이면 1월1일이 포함된 주는 해당 해의 첫 번째 주로 간주하지 않는다. 예) 2005년 1월 1일은 토요일이므로 1월1일이 포함된 주는 2005년의 첫 번째 주로 간주하지 않는다. FirstFullWeek : 1월의 첫 번째 주가 7일이 아니면 해당 해의 첫 번째 주로 삼지 않는다. 예) 한 주의 시작 요일이 일요일인 경우, 1월1일이 일요일이 아니라면 1월1일이 포함된 주는 해당 해의 첫 번째 주로 간주하지 않는다.

Method Details

AddWeekOfYears() public static method

yearAndWeekweeks만큼의 주차를 더한 주차를 계산합니다.
public static AddWeekOfYears ( this yearAndWeek, int weeks, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : YearAndWeek
yearAndWeek this 기준 주차
weeks int 더할 주차 값
culture System.Globalization.CultureInfo 문화권
weekOfYearRule WeekOfYearRuleKind 주차 산정을 위한 룰
yearStartMonth int 한해의 시작 월
return YearAndWeek

AddWeekOfYears() public static method

yearAndWeekweeks만큼의 주차를 더한 주차를 계산합니다.
public static AddWeekOfYears ( this yearAndWeek, int weeks, ITimeCalendar timeCalendar ) : YearAndWeek
yearAndWeek this 기준 주차
weeks int 더할 주차 값
timeCalendar ITimeCalendar TimeCalendar
return YearAndWeek

GetCalendarWeekRule() public static method

주차 계산 룰과 문화권에 따른 주차 계산 룰을 구합니다.
public static GetCalendarWeekRule ( CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = null ) : CalendarWeekRule
culture System.Globalization.CultureInfo 문화권
weekOfYearRule WeekOfYearRuleKind 주차 계산 룰
return CalendarWeekRule

GetCalendarWeekRuleAndFirstDayOfWeek() public static method

weekOfYearRule 에 따라 weekRulefirstDayOfWeek 를 결정합니다.
public static GetCalendarWeekRuleAndFirstDayOfWeek ( CultureInfo culture, WeekOfYearRuleKind weekOfYearRule, CalendarWeekRule &weekRule, DayOfWeek &firstDayOfWeek ) : void
culture System.Globalization.CultureInfo 문화권
weekOfYearRule WeekOfYearRuleKind 주차 계산을 위한 룰
weekRule CalendarWeekRule 한해의 첫주를 산정하는 규칙
firstDayOfWeek DayOfWeek 한주의 첫번째 요일
return void

GetEndWeekRangeOfYear() public static method

해당 년도의 마지막 주차에 해당하는 기간을 WeekRange로 반환합니다.
public static GetEndWeekRangeOfYear ( this year, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : WeekRange
year this 년도
culture System.Globalization.CultureInfo 문하권
weekOfYearRule WeekOfYearRuleKind 한 해의 첫주를 산정하는 룰
yearStartMonth int 한 해의 시작 월
return NSoft.NFramework.TimePeriods.TimeRanges.WeekRange

GetEndWeekRangeOfYear() public static method

해당 년도의 마지막 주차에 해당하는 기간을 WeekRange로 반환합니다.
public static GetEndWeekRangeOfYear ( this year, ITimeCalendar timeCalendar ) : WeekRange
year this 년도
timeCalendar ITimeCalendar TimeCalendar 옵션
return NSoft.NFramework.TimePeriods.TimeRanges.WeekRange

GetEndYearAndWeek() public static method

해당 년도의 주차산정방식에 따라 마지막 주차를 산정합니다.
public static GetEndYearAndWeek ( this year, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : YearAndWeek
year this 해당 년도
culture System.Globalization.CultureInfo 문화권
weekOfYearRule WeekOfYearRuleKind 한해의 첫번째 주차를 산정하는 방식
yearStartMonth int 년의 시작 월
return YearAndWeek

GetEndYearAndWeek() public static method

해당 년도의 주차산정방식에 따라 마지막 주차를 산정합니다.
public static GetEndYearAndWeek ( this year, ITimeCalendar timeCalendar ) : YearAndWeek
year this 해당 년도
timeCalendar ITimeCalendar TimeCalendar
return YearAndWeek

GetFirstDayOfWeek() public static method

주차 계산 룰과 문화권에 따른 한주의 첫번째 요일을 구합니다.
public static GetFirstDayOfWeek ( CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = null ) : DayOfWeek
culture System.Globalization.CultureInfo 문화권
weekOfYearRule WeekOfYearRuleKind 주차 계산 룰
return DayOfWeek

GetStartWeekRangeOfYear() public static method

해당 년도의 첫번째 주차에 해당하는 기간을 WeekRange로 반환합니다.
public static GetStartWeekRangeOfYear ( this year, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : WeekRange
year this 년도
culture System.Globalization.CultureInfo 문하권
weekOfYearRule WeekOfYearRuleKind 한 해의 첫주를 산정하는 룰
yearStartMonth int 한 해의 시작 월
return NSoft.NFramework.TimePeriods.TimeRanges.WeekRange

GetStartWeekRangeOfYear() public static method

해당 년도의 첫번째 주차에 해당하는 기간을 WeekRange로 반환합니다.
public static GetStartWeekRangeOfYear ( this year, ITimeCalendar timeCalendar ) : WeekRange
year this 년도
timeCalendar ITimeCalendar TimeCalendar 옵션
return NSoft.NFramework.TimePeriods.TimeRanges.WeekRange

GetWeekOfYearRuleKind() public static method

weekRule, firstDayOfWeek에 해당하는 WeekOfYearRuleKind를 판단합니다.
public static GetWeekOfYearRuleKind ( CalendarWeekRule weekRule = null, DayOfWeek firstDayOfWeek = null ) : WeekOfYearRuleKind
weekRule CalendarWeekRule 한해의 첫주를 산정하는 규칙
firstDayOfWeek DayOfWeek 한주의 첫번째 요일
return WeekOfYearRuleKind

GetWeekRange() public static method

yearAndWeek 주차에 해당하는 기간을 WeekRange 로 반환합니다. (예: 2011년 28주차의 실제 기간)
public static GetWeekRange ( this yearAndWeek, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : WeekRange
yearAndWeek this 년도와 주차 정보
culture System.Globalization.CultureInfo 문하권
weekOfYearRule WeekOfYearRuleKind 한해의 첫주를 산정하는 규칙
yearStartMonth int 한 해의 시작 월
return NSoft.NFramework.TimePeriods.TimeRanges.WeekRange

GetWeekRange() public static method

yearAndWeek 주차에 해당하는 기간을 WeekRange 로 반환합니다. (예: 2011년 28주차의 실제 기간)
public static GetWeekRange ( this yearAndWeek, ITimeCalendar timeCalendar ) : WeekRange
yearAndWeek this 년도와 주차 정보
timeCalendar ITimeCalendar TimeCalendar 옵션
return NSoft.NFramework.TimePeriods.TimeRanges.WeekRange

GetYearAndWeek() public static method

해당일자의 주차를 구한다. 문화권(Culture) 및 새해 첫주차에 대한 정의에 따라 주차가 달라진다. ref : http://www.simpleisbest.net/archive/2005/10/27/279.aspx ref : http://en.wikipedia.org/wiki/ISO_8601#Week_dates
CalendarWeekRule 값에 따라 WeekOfYear 가 결정된다. FirstDay : 1월1일이 포함된 주를 무조건 첫째 주로 삼는다. (우리나라, 미국 등의 기준) : .NET의 설정대로 하면 이렇게 된다. FirstForDayWeek : 1월1일이 포함된 주가 4일 이상인 경우에만 그 해의 첫 번째 주로 삼는다. (ISO 8601) 예) 한 주의 시작 요일이 일요일이고 1월1일이 일/월/화/수 중 하나이면 1월1일이 포함된 주는 해당 해의 첫 번째 주이다. 예) 한 주의 시작 요일이 일요일이고 1월1일이 목/금/토 중 하나이면 1월1일이 포함된 주는 해당 해의 첫 번째 주로 간주하지 않는다. 예) 2005년 1월 1일은 토요일이므로 1월1일이 포함된 주는 2005년의 첫 번째 주로 간주하지 않는다. FirstFullWeek : 1월의 첫 번째 주가 7일이 아니면 해당 해의 첫 번째 주로 삼지 않는다. 예) 한 주의 시작 요일이 일요일인 경우, 1월1일이 일요일이 아니라면 1월1일이 포함된 주는 해당 해의 첫 번째 주로 간주하지 않는다.
public static GetYearAndWeek ( this moment, CultureInfo culture = null, WeekOfYearRuleKind weekOfYearRule = WeekOfYearRuleKind.Calendar, int yearStartMonth = TimeSpec.CalendarYearStartMonth ) : YearAndWeek
moment this 주차(WeekOfYear)를 산정하기 위한 일자
culture System.Globalization.CultureInfo 해당 Calendar를 얻기위한 문화권
weekOfYearRule WeekOfYearRuleKind 주차를 산정하는 방식
yearStartMonth int 한 해의 시작 월
return YearAndWeek

GetYearAndWeek() public static method

해당일자의 주차를 구한다. 문화권(Culture) 및 새해 첫주차에 대한 정의에 따라 주차가 달라진다. ref : http://www.simpleisbest.net/archive/2005/10/27/279.aspx ref : http://en.wikipedia.org/wiki/ISO_8601#Week_dates
CalendarWeekRule 값에 따라 WeekOfYear 가 결정된다. FirstDay : 1월1일이 포함된 주를 무조건 첫째 주로 삼는다. (우리나라, 미국 등의 기준) : .NET의 설정대로 하면 이렇게 된다. FirstFourDayWeek : 1월1일이 포함된 주가 4일 이상인 경우에만 그 해의 첫 번째 주로 삼는다. (ISO 8601) 예) 한 주의 시작 요일이 일요일이고 1월1일이 일/월/화/수 중 하나이면 1월1일이 포함된 주는 해당 해의 첫 번째 주이다. 예) 한 주의 시작 요일이 일요일이고 1월1일이 목/금/토 중 하나이면 1월1일이 포함된 주는 해당 해의 첫 번째 주로 간주하지 않는다. 예) 2005년 1월 1일은 토요일이므로 1월1일이 포함된 주는 2005년의 첫 번째 주로 간주하지 않는다. FirstFullWeek : 1월의 첫 번째 주가 7일이 아니면 해당 해의 첫 번째 주로 삼지 않는다. 예) 한 주의 시작 요일이 일요일인 경우, 1월1일이 일요일이 아니라면 1월1일이 포함된 주는 해당 해의 첫 번째 주로 간주하지 않는다.
public static GetYearAndWeek ( this moment, ITimeCalendar timeCalendar ) : YearAndWeek
moment this 주차(WeekOfYear)를 산정하기 위한 일자
timeCalendar ITimeCalendar 주차 계산을 위한 규칙 정보를 가진 TimeCalendar 인스턴스
return YearAndWeek