System.Globalization.KoreanCalendar Class

Assembly: Mscorlib.dll
Namespace: System.Globalization
Summary
Represents the Korean calendar.
C# Syntax:
[Serializable]
public class KoreanCalendar : Calendar
Remarks
The Korean calendar works exactly like the Gregorian calendar, except that the year and era are different.

The KoreanCalendar class recognizes only the current era.

Leap years in the Korean calendar correspond to the same leap years in the Gregorian calendar. A leap year in the Gregorian calendar is defined as a Gregorian year that is evenly divisible by four, except if it is divisible by 100; however, Gregorian years that are divisible by 400 are leap years. A common year has 365 days and a leap year has 366 days.

The Korean calendar has 12 months with 28 to 31 days each:



GetMonth value Month Days in common years Days in leap years
1 1월 (January) 31 31
2 2월 (February) 28 29
3 3월 (March) 31 31
4 4월 (April) 30 30
5 5월 (May) 31 31
6 6월 (June) 30 30
7 7월 (July) 31 31
8 8월 (August) 31 31
9 9월 (September) 30 30
10 10월 (October) 31 31
11 11월 (November) 30 30
12 12월 (December) 31 31

February has 29 days during leap years and 28 during common years.

The date January 1, 2001 A.D. in the Gregorian calendar is equivalent to the first day of January in the year 4334 of the current era in the Korean calendar.

See also:
System.Globalization Namespace | Calendar | GregorianCalendar

System.Globalization.KoreanCalendar Member List:

Public Constructors
ctor #1 Default constructor. This constructor is called by derived class constructors to initialize state in this type.
Initializes a new instance of the KoreanCalendar class.
Public Fields
KoreanEra Represents the current era. This field is constant.
Public Properties
Eras Read-only

Overridden:
Gets the list of eras in the KoreanCalendar.
TwoDigitYearMax Read-write

Overridden:
Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.
Public Methods
AddDays
(inherited from System.Globalization.Calendar)
See base class member description: System.Globalization.Calendar.AddDays


Returns a DateTime that is the specified number of days away from the specified DateTime.
AddHours
(inherited from System.Globalization.Calendar)
See base class member description: System.Globalization.Calendar.AddHours


Returns a DateTime that is the specified number of hours away from the specified DateTime.
AddMilliseconds
(inherited from System.Globalization.Calendar)
See base class member description: System.Globalization.Calendar.AddMilliseconds


Returns a DateTime that is the specified number of milliseconds away from the specified DateTime.
AddMinutes
(inherited from System.Globalization.Calendar)
See base class member description: System.Globalization.Calendar.AddMinutes


Returns a DateTime that is the specified number of minutes away from the specified DateTime.
AddMonths Overridden:
Returns a DateTime that is the specified number of months away from the specified DateTime.
AddSeconds
(inherited from System.Globalization.Calendar)
See base class member description: System.Globalization.Calendar.AddSeconds


Returns a DateTime that is the specified number of seconds away from the specified DateTime.
AddWeeks
(inherited from System.Globalization.Calendar)
See base class member description: System.Globalization.Calendar.AddWeeks


Returns a DateTime that is the specified number of weeks away from the specified DateTime.
AddYears Overridden:
Returns a DateTime that is the specified number of years away from the specified DateTime.
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetDayOfMonth Overridden:
Returns the day of the month in the specified DateTime.
GetDayOfWeek Overridden:
Returns the day of the week in the specified DateTime.
GetDayOfYear Overridden:
Returns the day of the year in the specified DateTime.
GetDaysInMonth
(inherited from System.Globalization.Calendar)
Overloaded:
GetDaysInMonth(int year, int month)

See base class member description: System.Globalization.Calendar.GetDaysInMonth


Returns the number of days in the specified month in the specified year in the current era.
GetDaysInMonth Overloaded:
GetDaysInMonth(int year, int month, int era)

Overridden:
Returns the number of days in the specified month in the specified year in the specified era.
GetDaysInYear
(inherited from System.Globalization.Calendar)
Overloaded:
GetDaysInYear(int year)

See base class member description: System.Globalization.Calendar.GetDaysInYear


Returns the number of days in the specified year in the current era.
GetDaysInYear Overloaded:
GetDaysInYear(int year, int era)

Overridden:
Returns the number of days in the specified year in the specified era.
GetEra Overridden:
Returns the era in the specified DateTime.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetHour
(inherited from System.Globalization.Calendar)
See base class member description: System.Globalization.Calendar.GetHour


Returns the hours value in the specified DateTime.
GetMilliseconds
(inherited from System.Globalization.Calendar)
See base class member description: System.Globalization.Calendar.GetMilliseconds


Returns the milliseconds value in the specified DateTime.
GetMinute
(inherited from System.Globalization.Calendar)
See base class member description: System.Globalization.Calendar.GetMinute


Returns the minutes value in the specified DateTime.
GetMonth Overridden:
Returns the month in the specified DateTime.
GetMonthsInYear
(inherited from System.Globalization.Calendar)
Overloaded:
GetMonthsInYear(int year)

See base class member description: System.Globalization.Calendar.GetMonthsInYear


Returns the number of months in the specified year in the current era.
GetMonthsInYear Overloaded:
GetMonthsInYear(int year, int era)

Overridden:
Returns the number of months in the specified year in the specified era.
GetSecond
(inherited from System.Globalization.Calendar)
See base class member description: System.Globalization.Calendar.GetSecond


Returns the seconds value in the specified DateTime.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
GetWeekOfYear
(inherited from System.Globalization.Calendar)
See base class member description: System.Globalization.Calendar.GetWeekOfYear


Returns the week of the year that includes the date in the specified DateTime.
GetYear Overridden:
Returns the year in the specified DateTime.
IsLeapDay
(inherited from System.Globalization.Calendar)
Overloaded:
IsLeapDay(int year, int month, int day)

See base class member description: System.Globalization.Calendar.IsLeapDay


Determines whether the specified date in the current era is a leap day.
IsLeapDay Overloaded:
IsLeapDay(int year, int month, int day, int era)

Overridden:
Determines whether the specified date in the specified era is a leap day.
IsLeapMonth
(inherited from System.Globalization.Calendar)
Overloaded:
IsLeapMonth(int year, int month)

See base class member description: System.Globalization.Calendar.IsLeapMonth


Determines whether the specified month in the specified year in the current era is a leap month.
IsLeapMonth Overloaded:
IsLeapMonth(int year, int month, int era)

Overridden:
Determines whether the specified month in the specified year in the specified era is a leap month.
IsLeapYear
(inherited from System.Globalization.Calendar)
Overloaded:
IsLeapYear(int year)

See base class member description: System.Globalization.Calendar.IsLeapYear


Determines whether the specified year in the current era is a leap year.
IsLeapYear Overloaded:
IsLeapYear(int year, int era)

Overridden:
Determines whether the specified year in the specified era is a leap year.
ToDateTime
(inherited from System.Globalization.Calendar)
Overloaded:
ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond)

See base class member description: System.Globalization.Calendar.ToDateTime


Returns a DateTime that is set to the specified date and time in the current era.
ToDateTime Overloaded:
ToDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, int era)

Overridden:
Returns a DateTime that is set to the specified date and time in the specified era.
ToFourDigitYear Overridden:
Converts the specified two-digit year to a four-digit year by using the KoreanCalendar.TwoDigitYearMax property to determine the appropriate century.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Globalization.KoreanCalendar Member Details

ctor #1
Summary
Initializes a new instance of the KoreanCalendar class.

Default constructor. This constructor is called by derived class constructors to initialize state in this type.
C# Syntax:
public KoreanCalendar();

Return to top


Field: KoreanEra
Summary
Represents the current era. This field is constant.
C# Syntax:
public const int KoreanEra;
Remarks
The KoreanCalendar class recognizes only the current era. This field always returns 1.
See also:
KoreanCalendar.Eras

Return to top


Overridden Property: Eras (read-only)
Summary
Gets the list of eras in the KoreanCalendar.
C# Syntax:
public override int[] Eras {get;}
Remarks
The KoreanCalendar class recognizes only the current era. This property always returns an array with only one element.

Return to top


Overridden Property: TwoDigitYearMax (read-write)
Summary
Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.
C# Syntax:
public override int TwoDigitYearMax {get; set;}
Remarks
This property allows a 2-digit year to be properly translated to a 4-digit year. For example, in the Gregorian calendar, if this property is set to 2029, the 100-year range is from 1930 to 2029; therefore, a 2-digit value of 30 is interpreted as 1930, while a 2-digit value of 29 is interpreted as 2029.

The initial value of this property is derived from the settings in Regional and Language Options (or Regional Options or Regional Settings) in Control Panel in Windows. However, that information can change during the life of the AppDomain. The KoreanCalendar class does not detect changes in the system settings automatically.

See also:
KoreanCalendar.ToFourDigitYear

Return to top


Method: AddDays(
   DateTime time,
   int days
)
Inherited
See base class member description: System.Globalization.Calendar.AddDays

Summary
Returns a DateTime that is the specified number of days away from the specified DateTime.
C# Syntax:
public virtual DateTime AddDays(
   DateTime time,
   int days
);
Parameters:

time

The DateTime to which to add days.

days

The number of days to add.

Return Value:
The DateTime that results from adding the specified number of days to the specified DateTime.
Exceptions
Exception Type Condition
ArgumentException The resulting DateTime is outside the supported range.
Remarks
The days value is rounded to the nearest millisecond before it is added to the specified DateTime. If days is negative, the resulting DateTime is earlier than the specified DateTime.
See also:
DateTime | Calendar.AddYears | Calendar.AddMonths | Calendar.AddWeeks | Calendar.AddHours | Calendar.AddMinutes | Calendar.AddSeconds | Calendar.AddMilliseconds

Return to top


Method: AddHours(
   DateTime time,
   int hours
)
Inherited
See base class member description: System.Globalization.Calendar.AddHours

Summary
Returns a DateTime that is the specified number of hours away from the specified DateTime.
C# Syntax:
public virtual DateTime AddHours(
   DateTime time,
   int hours
);
Parameters:

time

The DateTime to which to add hours.

hours

The number of hours to add.

Return Value:
The DateTime that results from adding the specified number of hours to the specified DateTime.
Exceptions
Exception Type Condition
ArgumentException The resulting DateTime is outside the supported range.
Remarks
The hours value is rounded to the nearest millisecond before it is added to the specified DateTime. If hours is negative, the resulting DateTime is earlier than the specified DateTime.
See also:
DateTime | Calendar.AddYears | Calendar.AddMonths | Calendar.AddWeeks | Calendar.AddDays | Calendar.AddMinutes | Calendar.AddSeconds | Calendar.AddMilliseconds

Return to top


Method: AddMilliseconds(
   DateTime time,
   double milliseconds
)
Inherited
See base class member description: System.Globalization.Calendar.AddMilliseconds

Summary
Returns a DateTime that is the specified number of milliseconds away from the specified DateTime.
C# Syntax:
public virtual DateTime AddMilliseconds(
   DateTime time,
   double milliseconds
);
Parameters:

time

The DateTime to which to add milliseconds.

milliseconds

The number of milliseconds to add.

Return Value:
The DateTime that results from adding the specified number of milliseconds to the specified DateTime.
Exceptions
Exception Type Condition
ArgumentException The resulting DateTime is outside the supported range.
Remarks
The milliseconds value is rounded to the nearest integer before it is added to the specified DateTime. If milliseconds is negative, the resulting DateTime is earlier than the specified DateTime.
See also:
DateTime | Calendar.AddYears | Calendar.AddMonths | Calendar.AddWeeks | Calendar.AddDays | Calendar.AddHours | Calendar.AddMinutes | Calendar.AddSeconds

Return to top


Method: AddMinutes(
   DateTime time,
   int minutes
)
Inherited
See base class member description: System.Globalization.Calendar.AddMinutes

Summary
Returns a DateTime that is the specified number of minutes away from the specified DateTime.
C# Syntax:
public virtual DateTime AddMinutes(
   DateTime time,
   int minutes
);
Parameters:

time

The DateTime to which to add minutes.

minutes

The number of minutes to add.

Return Value:
The DateTime that results from adding the specified number of minutes to the specified DateTime.
Exceptions
Exception Type Condition
ArgumentException The resulting DateTime is outside the supported range.
Remarks
The minutes value is rounded to the nearest millisecond before it is added to the specified DateTime. If minutes is negative, the resulting DateTime is earlier than the specified DateTime.
See also:
DateTime | Calendar.AddYears | Calendar.AddMonths | Calendar.AddWeeks | Calendar.AddDays | Calendar.AddHours | Calendar.AddSeconds | Calendar.AddMilliseconds

Return to top


Overridden Method: AddMonths(
   DateTime time,
   int months
)
Summary
Returns a DateTime that is the specified number of months away from the specified DateTime.
C# Syntax:
public override DateTime AddMonths(
   DateTime time,
   int months
);
Parameters:

time

The DateTime to which to add months.

months

The number of months to add.

Return Value:
The DateTime that results from adding the specified number of months to the specified DateTime.
Exceptions
Exception Type Condition
ArgumentException The resulting DateTime is outside the supported range.
ArgumentOutOfRangeException months is less than -120000.

-or-

months is greater than 120000.

Remarks
The year part of the resulting DateTime is affected if the resulting month is beyond the last month of the current year. The day part of the resulting DateTime is also affected if the resulting day is not a valid day in the resulting month of the resulting year; it is changed to the last valid day in the resulting month of the resulting year. The time-of-day part of the resulting DateTime remains the same as the specified DateTime.

For example, if the specified month is October, which has 31 days, the specified day is the 31st day of that month, and the value of the months parameter is 6, the resulting year is one more than the specified year, the resulting month is April, and the resulting day is the 30th day, which is the last day in April.

If the value of the months parameter is negative, the resulting DateTime is earlier than the specified DateTime.

See also:
DateTime | KoreanCalendar.AddYears

Return to top


Method: AddSeconds(
   DateTime time,
   int seconds
)
Inherited
See base class member description: System.Globalization.Calendar.AddSeconds

Summary
Returns a DateTime that is the specified number of seconds away from the specified DateTime.
C# Syntax:
public virtual DateTime AddSeconds(
   DateTime time,
   int seconds
);
Parameters:

time

The DateTime to which to add seconds.

seconds

The number of seconds to add.

Return Value:
The DateTime that results from adding the specified number of seconds to the specified DateTime.
Exceptions
Exception Type Condition
ArgumentException The resulting DateTime is outside the supported range.
Remarks
The value parameter is rounded to the nearest millisecond before it is added to the specified DateTime. If value is negative, the resulting DateTime is earlier than the specified DateTime.
See also:
DateTime | Calendar.AddYears | Calendar.AddMonths | Calendar.AddWeeks | Calendar.AddDays | Calendar.AddHours | Calendar.AddMinutes | Calendar.AddMilliseconds

Return to top


Method: AddWeeks(
   DateTime time,
   int weeks
)
Inherited
See base class member description: System.Globalization.Calendar.AddWeeks

Summary
Returns a DateTime that is the specified number of weeks away from the specified DateTime.
C# Syntax:
public virtual DateTime AddWeeks(
   DateTime time,
   int weeks
);
Parameters:

time

The DateTime to which to add weeks.

weeks

The number of weeks to add.

Return Value:
The DateTime that results from adding the specified number of weeks to the specified DateTime.
Exceptions
Exception Type Condition
ArgumentException The resulting DateTime is outside the supported range.
Remarks
If weeks is negative, the resulting DateTime is earlier than the specified DateTime.

In all .NET Framework classes derived from the Calendar class, a week is defined as seven days, except the first and last weeks of the year which might have less than seven days.

See also:
DateTime | Calendar.AddYears | Calendar.AddMonths | Calendar.AddDays | Calendar.AddHours | Calendar.AddMinutes | Calendar.AddSeconds | Calendar.AddMilliseconds

Return to top


Overridden Method: AddYears(
   DateTime time,
   int years
)
Summary
Returns a DateTime that is the specified number of years away from the specified DateTime.
C# Syntax:
public override DateTime AddYears(
   DateTime time,
   int years
);
Parameters:

time

The DateTime to which to add years.

years

The number of years to add.

Return Value:
The DateTime that results from adding the specified number of years to the specified DateTime.
Exceptions
Exception Type Condition
ArgumentException The resulting DateTime is outside the supported range.
Remarks
The day part of the resulting DateTime is affected if the resulting day is not a valid day in the resulting month of the resulting year; it is changed to the last valid day in the resulting month of the resulting year. The time-of-day part of the resulting DateTime remains the same as the specified DateTime.

For example, February has 28 days, except during leap years when it has 29 days. If the specified date is the 29th day of February in a leap year and the value of years is 1, the resulting date will be the 28th day of February in the following year.

If years is negative, the resulting DateTime is earlier than the specified DateTime.

See also:
DateTime | KoreanCalendar.AddMonths

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~KoreanCalendar();

For more information on members inherited from System.Object click on the link above.

Return to top


Overridden Method: GetDayOfMonth(
   DateTime time
)
Summary
Returns the day of the month in the specified DateTime.
C# Syntax:
public override int GetDayOfMonth(
   DateTime time
);
Parameters:

time

The DateTime to read.

Return Value:
An integer from 1 to 31 that represents the day of the month in the specified DateTime.
See also:
DateTime.Day | KoreanCalendar.GetEra | KoreanCalendar.GetYear | KoreanCalendar.GetMonth | KoreanCalendar.GetDayOfYear | KoreanCalendar.GetDayOfWeek

Return to top


Overridden Method: GetDayOfWeek(
   DateTime time
)
Summary
Returns the day of the week in the specified DateTime.
C# Syntax:
public override DayOfWeek GetDayOfWeek(
   DateTime time
);
Parameters:

time

The DateTime to read.

Return Value:
A DayOfWeek value that represents the day of the week in the specified DateTime.
Remarks
The DayOfWeek values are as follows:

DayOfWeek value which indicates
Sunday 일요일
Monday 월요일
Tuesday 화요일
Wednesday 수요일
Thursday 목요일
Friday 금요일
Saturday 토요일
See also:
DateTime.DayOfWeek | DayOfWeek | KoreanCalendar.GetEra | KoreanCalendar.GetYear | KoreanCalendar.GetMonth | KoreanCalendar.GetDayOfYear | KoreanCalendar.GetDayOfMonth

Return to top


Overridden Method: GetDayOfYear(
   DateTime time
)
Summary
Returns the day of the year in the specified DateTime.
C# Syntax:
public override int GetDayOfYear(
   DateTime time
);
Parameters:

time

The DateTime to read.

Return Value:
An integer from 1 to 366 that represents the day of the year in the specified DateTime.
See also:
DateTime.DayOfYear | KoreanCalendar.GetEra | KoreanCalendar.GetYear | KoreanCalendar.GetMonth | KoreanCalendar.GetDayOfMonth | KoreanCalendar.GetDayOfWeek

Return to top


Overloaded Method: GetDaysInMonth(
   int year,
   int month
)
Inherited
See base class member description: System.Globalization.Calendar.GetDaysInMonth

Summary
Returns the number of days in the specified month in the specified year in the current era.
C# Syntax:
public virtual int GetDaysInMonth(
   int year,
   int month
);
Parameters:

year

An integer that represents the year.

month

An integer that represents the month.

Return Value:
The number of days in the specified month in the specified year in the current era.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.

-or-

month is outside the range supported by the calendar.

Remarks
For example, in the Gregorian calendar, this method returns 28 or 29 for February (month = 2), depending on whether year is a leap year.
See also:
GregorianCalendar | Calendar.GetMonthsInYear | Calendar.GetDaysInYear

Return to top


Overloaded Method: GetDaysInMonth(
   int year,
   int month,
   int era
)
Summary
Returns the number of days in the specified month in the specified year in the specified era.
C# Syntax:
public override int GetDaysInMonth(
   int year,
   int month,
   int era
);
Parameters:

year

An integer that represents the year.

month

An integer that represents the month.

era

An integer that represents the era.

Return Value:
The number of days in the specified month in the specified year in the specified era.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.

-or-

month is outside the range supported by the calendar.

-or-

era is outside the range supported by the calendar.

Remarks
For example, this method returns 28 or 29 for February (month = 2), depending on whether year is a leap year.
See also:
KoreanCalendar.Eras | KoreanCalendar.GetMonthsInYear | KoreanCalendar.GetDaysInYear

Return to top


Overloaded Method: GetDaysInYear(
   int year
)
Inherited
See base class member description: System.Globalization.Calendar.GetDaysInYear

Summary
Returns the number of days in the specified year in the current era.
C# Syntax:
public virtual int GetDaysInYear(
   int year
);
Parameters:

year

An integer that represents the year.

Return Value:
The number of days in the specified year in the current era.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.
Remarks
For example, in the Gregorian calendar, this method returns 365 or 366, depending on whether year is a leap year.
See also:
GregorianCalendar | Calendar.GetMonthsInYear | Calendar.GetDaysInMonth

Return to top


Overloaded Method: GetDaysInYear(
   int year,
   int era
)
Summary
Returns the number of days in the specified year in the specified era.
C# Syntax:
public override int GetDaysInYear(
   int year,
   int era
);
Parameters:

year

An integer that represents the year.

era

An integer that represents the era.

Return Value:
The number of days in the specified year in the specified era.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar. -or-

era is outside the range supported by the calendar.

Remarks
For example, this method returns 365 or 366, depending on whether year is a leap year.
See also:
KoreanCalendar.Eras | KoreanCalendar.GetMonthsInYear | KoreanCalendar.GetDaysInMonth

Return to top


Overridden Method: GetEra(
   DateTime time
)
Summary
Returns the era in the specified DateTime.
C# Syntax:
public override int GetEra(
   DateTime time
);
Parameters:

time

The DateTime to read.

Return Value:
An integer that represents the era in the specified DateTime.
Remarks
The KoreanCalendar class recognizes only the current era.
See also:
DateTime | KoreanCalendar.Eras | KoreanCalendar.GetYear | KoreanCalendar.GetMonth | KoreanCalendar.GetDayOfYear | KoreanCalendar.GetDayOfMonth | KoreanCalendar.GetDayOfWeek

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHour(
   DateTime time
)
Inherited
See base class member description: System.Globalization.Calendar.GetHour

Summary
Returns the hours value in the specified DateTime.
C# Syntax:
public virtual int GetHour(
   DateTime time
);
Parameters:

time

The DateTime to read.

Return Value:
An integer from 0 to 23 that represents the hour in time.
See also:
DateTime.Hour | Calendar.GetEra | Calendar.GetYear | Calendar.GetMonth | Calendar.GetWeekOfYear | Calendar.GetDayOfYear | Calendar.GetDayOfMonth | Calendar.GetDayOfWeek | Calendar.GetMinute | Calendar.GetSecond | Calendar.GetMilliseconds

Return to top


Method: GetMilliseconds(
   DateTime time
)
Inherited
See base class member description: System.Globalization.Calendar.GetMilliseconds

Summary
Returns the milliseconds value in the specified DateTime.
C# Syntax:
public virtual double GetMilliseconds(
   DateTime time
);
Parameters:

time

The DateTime to read.

Return Value:
An integer that represents the milliseconds in time.
Remarks
The returned value is an integer from 0 to 999.
See also:
DateTime.Millisecond | Calendar.GetEra | Calendar.GetYear | Calendar.GetMonth | Calendar.GetWeekOfYear | Calendar.GetDayOfYear | Calendar.GetDayOfMonth | Calendar.GetDayOfWeek | Calendar.GetHour | Calendar.GetMinute | Calendar.GetSecond

Return to top


Method: GetMinute(
   DateTime time
)
Inherited
See base class member description: System.Globalization.Calendar.GetMinute

Summary
Returns the minutes value in the specified DateTime.
C# Syntax:
public virtual int GetMinute(
   DateTime time
);
Parameters:

time

The DateTime to read.

Return Value:
An integer that represents the minutes in time.
Remarks
The returned value is an integer from 0 to 59.
See also:
DateTime.Minute | Calendar.GetEra | Calendar.GetYear | Calendar.GetMonth | Calendar.GetWeekOfYear | Calendar.GetDayOfYear | Calendar.GetDayOfMonth | Calendar.GetDayOfWeek | Calendar.GetHour | Calendar.GetSecond | Calendar.GetMilliseconds

Return to top


Overridden Method: GetMonth(
   DateTime time
)
Summary
Returns the month in the specified DateTime.
C# Syntax:
public override int GetMonth(
   DateTime time
);
Parameters:

time

The DateTime to read.

Return Value:
An integer between 1 and 12 that represents the month in the specified DateTime.
See also:
DateTime.Month | KoreanCalendar.GetEra | KoreanCalendar.GetYear | KoreanCalendar.GetDayOfYear | KoreanCalendar.GetDayOfMonth | KoreanCalendar.GetDayOfWeek

Return to top


Overloaded Method: GetMonthsInYear(
   int year
)
Inherited
See base class member description: System.Globalization.Calendar.GetMonthsInYear

Summary
Returns the number of months in the specified year in the current era.
C# Syntax:
public virtual int GetMonthsInYear(
   int year
);
Parameters:

year

An integer that represents the year.

Return Value:
The number of months in the specified year in the current era.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.
See also:
Calendar.GetDaysInYear | Calendar.GetDaysInMonth

Return to top


Overloaded Method: GetMonthsInYear(
   int year,
   int era
)
Summary
Returns the number of months in the specified year in the specified era.
C# Syntax:
public override int GetMonthsInYear(
   int year,
   int era
);
Parameters:

year

An integer that represents the year.

era

An integer that represents the era.

Return Value:
The number of months in the specified year in the specified era.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.

-or-

era is outside the range supported by the calendar.

See also:
KoreanCalendar.Eras | KoreanCalendar.GetDaysInYear | KoreanCalendar.GetDaysInMonth

Return to top


Method: GetSecond(
   DateTime time
)
Inherited
See base class member description: System.Globalization.Calendar.GetSecond

Summary
Returns the seconds value in the specified DateTime.
C# Syntax:
public virtual int GetSecond(
   DateTime time
);
Parameters:

time

The DateTime to read.

Return Value:
An integer that represents the seconds in time.
Remarks
The returned value is an integer from 0 to 59.
See also:
DateTime.Second | Calendar.GetEra | Calendar.GetYear | Calendar.GetMonth | Calendar.GetWeekOfYear | Calendar.GetDayOfYear | Calendar.GetDayOfMonth | Calendar.GetDayOfWeek | Calendar.GetHour | Calendar.GetMinute | Calendar.GetMilliseconds

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetWeekOfYear(
   DateTime time,
   CalendarWeekRule rule,
   DayOfWeek firstDayOfWeek
)
Inherited
See base class member description: System.Globalization.Calendar.GetWeekOfYear

Summary
Returns the week of the year that includes the date in the specified DateTime.
C# Syntax:
public virtual int GetWeekOfYear(
   DateTime time,
   CalendarWeekRule rule,
   DayOfWeek firstDayOfWeek
);
Parameters:

time

The DateTime to read.

rule

A CalendarWeekRule value that defines a calendar week.

firstDayOfWeek

A DayOfWeek value that represents the first day of the week.

Return Value:
An integer that represents the week of the year that includes the date in time.
Exceptions
Exception Type Condition
ArgumentOutOfRangeException firstDayOfWeek is outside the range supported by the calendar.

-or-

rule is not a valid CalendarWeekRule value.

Remarks
DateTimeFormatInfo.FirstDayOfWeek of CultureInfo.DateTimeFormat contains the default DayOfWeek value that represents the first day of the week for a specific culture.

DateTimeFormatInfo.CalendarWeekRule of CultureInfo.DateTimeFormat contains the default CalendarWeekRule value that defines a calendar week for a specific culture.

This method can also be used to determine the number of weeks in the year by setting time to the last day of the year.

See also:
DateTime | CalendarWeekRule | DayOfWeek | Calendar.GetEra | Calendar.GetYear | Calendar.GetMonth | Calendar.GetDayOfYear | Calendar.GetDayOfMonth | Calendar.GetDayOfWeek | Calendar.GetHour | Calendar.GetMinute | Calendar.GetSecond | Calendar.GetMilliseconds

Return to top


Overridden Method: GetYear(
   DateTime time
)
Summary
Returns the year in the specified DateTime.
C# Syntax:
public override int GetYear(
   DateTime time
);
Parameters:

time

The DateTime to read.

Return Value:
An integer between 1 and 9999 that represents the year in the specified DateTime.
See also:
DateTime.Year | KoreanCalendar.GetEra | KoreanCalendar.GetMonth | KoreanCalendar.GetDayOfYear | KoreanCalendar.GetDayOfMonth | KoreanCalendar.GetDayOfWeek

Return to top


Overloaded Method: IsLeapDay(
   int year,
   int month,
   int day
)
Inherited
See base class member description: System.Globalization.Calendar.IsLeapDay

Summary
Determines whether the specified date in the current era is a leap day.
C# Syntax:
public virtual bool IsLeapDay(
   int year,
   int month,
   int day
);
Parameters:

year

An integer that represents the year.

month

An integer that represents the month.

day

An integer that represents the day.

Return Value:
true if the specified day is a leap day; otherwise, false.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.

-or-

month is outside the range supported by the calendar.

-or-

day is outside the range supported by the calendar.

Remarks
In order to make up for the difference between the calendar year and the actual time that the earth rotates around the sun or the actual time that the moon rotates around the earth, a leap year has a different number of days than a standard calendar year. Each Calendar implementation defines leap years differently.

A leap day is a day that occurs only in a leap year. For example, in the Gregorian calendar, the 29th day of February is the only leap day.

See also:
Calendar.GetMonthsInYear | Calendar.GetDaysInMonth | Calendar.IsLeapYear | Calendar.IsLeapMonth

Return to top


Overloaded Method: IsLeapDay(
   int year,
   int month,
   int day,
   int era
)
Summary
Determines whether the specified date in the specified era is a leap day.
C# Syntax:
public override bool IsLeapDay(
   int year,
   int month,
   int day,
   int era
);
Parameters:

year

An integer that represents the year.

month

An integer that represents the month.

day

An integer that represents the day.

era

An integer that represents the era.

Return Value:
true if the specified day is a leap day; otherwise, false.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.

-or-

month is outside the range supported by the calendar.

-or-

day is outside the range supported by the calendar.

-or-

era is outside the range supported by the calendar.

Remarks
Leap years in the Korean calendar correspond to the same leap years in the Gregorian calendar. A leap year in the Gregorian calendar is defined as a Gregorian year that is evenly divisible by four, except if it is divisible by 100; however, Gregorian years that are divisible by 400 are leap years. A common year has 365 days and a leap year has 366 days.

A leap day is a day that occurs only in a leap year. For example, the 29th day of February is the only leap day.

See also:
KoreanCalendar.Eras | KoreanCalendar.GetMonthsInYear | KoreanCalendar.GetDaysInMonth | KoreanCalendar.IsLeapYear | KoreanCalendar.IsLeapMonth

Return to top


Overloaded Method: IsLeapMonth(
   int year,
   int month
)
Inherited
See base class member description: System.Globalization.Calendar.IsLeapMonth

Summary
Determines whether the specified month in the specified year in the current era is a leap month.
C# Syntax:
public virtual bool IsLeapMonth(
   int year,
   int month
);
Parameters:

year

An integer that represents the year.

month

An integer that represents the month.

Return Value:
true if the specified month is a leap month; otherwise, false.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.

-or-

month is outside the range supported by the calendar.

Remarks
In order to make up for the difference between the calendar year and the actual time that the earth rotates around the sun or the actual time that the moon rotates around the earth, a leap year has a different number of days than a standard calendar year. Each Calendar implementation defines leap years differently.

A leap month is an entire month that occurs only in a leap year. For example, in the Hebrew calendar, Veadar is the only leap month.

See also:
Calendar.GetMonthsInYear | Calendar.IsLeapYear | Calendar.IsLeapDay

Return to top


Overloaded Method: IsLeapMonth(
   int year,
   int month,
   int era
)
Summary
Determines whether the specified month in the specified year in the specified era is a leap month.
C# Syntax:
public override bool IsLeapMonth(
   int year,
   int month,
   int era
);
Parameters:

year

An integer that represents the year.

month

An integer that represents the month.

era

An integer that represents the era.

Return Value:
This method always returns false, unless overridden by a derived class.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.

-or-

month is outside the range supported by the calendar.

-or-

era is outside the range supported by the calendar.

Remarks
Leap years in the Korean calendar correspond to the same leap years in the Gregorian calendar. A leap year in the Gregorian calendar is defined as a Gregorian year that is evenly divisible by four, except if it is divisible by 100; however, Gregorian years that are divisible by 400 are leap years. A common year has 365 days and a leap year has 366 days.

A leap month is an entire month that occurs only in a leap year. The Korean calendar does not have any leap months.

See also:
KoreanCalendar.Eras | KoreanCalendar.GetMonthsInYear | KoreanCalendar.IsLeapYear | KoreanCalendar.IsLeapDay

Return to top


Overloaded Method: IsLeapYear(
   int year
)
Inherited
See base class member description: System.Globalization.Calendar.IsLeapYear

Summary
Determines whether the specified year in the current era is a leap year.
C# Syntax:
public virtual bool IsLeapYear(
   int year
);
Parameters:

year

An integer that represents the year.

Return Value:
true if the specified year is a leap year; otherwise, false.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.
Remarks
In order to make up for the difference between the calendar year and the actual time that the earth rotates around the sun or the actual time that the moon rotates around the earth, a leap year has a different number of days than a standard calendar year. Each Calendar implementation defines leap years differently.
See also:
Calendar.IsLeapMonth | Calendar.IsLeapDay

Return to top


Overloaded Method: IsLeapYear(
   int year,
   int era
)
Summary
Determines whether the specified year in the specified era is a leap year.
C# Syntax:
public override bool IsLeapYear(
   int year,
   int era
);
Parameters:

year

An integer that represents the year.

era

An integer that represents the era.

Return Value:
true if the specified year is a leap year; otherwise, false.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.

-or-

era is outside the range supported by the calendar.

Remarks
Leap years in the Korean calendar correspond to the same leap years in the Gregorian calendar. A leap year in the Gregorian calendar is defined as a Gregorian year that is evenly divisible by four, except if it is divisible by 100; however, Gregorian years that are divisible by 400 are leap years. A common year has 365 days and a leap year has 366 days.
See also:
KoreanCalendar.Eras | KoreanCalendar.IsLeapMonth | KoreanCalendar.IsLeapDay

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Overloaded Method: ToDateTime(
   int year,
   int month,
   int day,
   int hour,
   int minute,
   int second,
   int millisecond
)
Inherited
See base class member description: System.Globalization.Calendar.ToDateTime

Summary
Returns a DateTime that is set to the specified date and time in the current era.
C# Syntax:
public virtual DateTime ToDateTime(
   int year,
   int month,
   int day,
   int hour,
   int minute,
   int second,
   int millisecond
);
Parameters:

year

An integer that represents the year.

month

An integer that represents the month.

day

An integer that represents the day.

hour

An integer that represents the hour.

minute

An integer that represents the minute.

second

An integer that represents the second.

millisecond

An integer that represents the millisecond.

Return Value:
The DateTime that is set to the specified date and time in the current era.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.

-or-

month is outside the range supported by the calendar.

-or-

day is outside the range supported by the calendar.

-or-

hour is less than zero or greater than 23.

-or-

minute is less than zero or greater than 59.

-or-

second is less than zero or greater than 59.

-or-

millisecond is less than zero or greater than 999.

See also:
DateTime | Calendar.GetMonthsInYear | Calendar.GetDaysInMonth

Return to top


Overloaded Method: ToDateTime(
   int year,
   int month,
   int day,
   int hour,
   int minute,
   int second,
   int millisecond,
   int era
)
Summary
Returns a DateTime that is set to the specified date and time in the specified era.
C# Syntax:
public override DateTime ToDateTime(
   int year,
   int month,
   int day,
   int hour,
   int minute,
   int second,
   int millisecond,
   int era
);
Parameters:

year

An integer that represents the year.

month

An integer that represents the month.

day

An integer that represents the day.

hour

An integer that represents the hour.

minute

An integer that represents the minute.

second

An integer that represents the second.

millisecond

An integer that represents the millisecond.

era

An integer that represents the era.

Return Value:
The DateTime that is set to the specified date and time in the current era.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.

-or-

month is outside the range supported by the calendar.

-or-

day is outside the range supported by the calendar.

-or-

hour is less than zero or greater than 23.

-or-

minute is less than zero or greater than 59.

-or-

second is less than zero or greater than 59.

-or-

millisecond is less than zero or greater than 999.

-or-

era is outside the range supported by the calendar.

See also:
DateTime | KoreanCalendar.Eras | KoreanCalendar.GetMonthsInYear | KoreanCalendar.GetDaysInMonth

Return to top


Overridden Method: ToFourDigitYear(
   int year
)
Summary
Converts the specified two-digit year to a four-digit year by using the KoreanCalendar.TwoDigitYearMax property to determine the appropriate century.
C# Syntax:
public override int ToFourDigitYear(
   int year
);
Parameters:

year

A two-digit integer that represents the year to convert.

Return Value:
An integer that contains the four-digit representation of year.
Exceptions
Exception Type Condition
ArgumentException year is outside the range supported by the calendar.
Remarks
KoreanCalendar.TwoDigitYearMax is the last year in the 100-year range that can be represented by a two-digit year. The century is determined by finding the sole occurrence of the two-digit year within that 100-year range. For example, if KoreanCalendar.TwoDigitYearMax is set to 2029, the 100-year range is from 1930 to 2029; therefore, a 2-digit value of 30 is interpreted as 1930, while a 2-digit value of 29 is interpreted as 2029.
See also:
KoreanCalendar.TwoDigitYearMax

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.