class JapaneseCalendar
in global :: System . Globalization
Represents the Japanese calendar.
public DateTime AddMonths( DateTime time, int months )
Returns a that is the specified number of months away from the specified .
timeThe to which to add months.monthsThe number of months to add.- Returns The that results from adding the specified number of months to the specified .
public DateTime AddYears( DateTime time, int years )
Returns a that is the specified number of years away from the specified .
timeThe to which to add years.yearsThe number of years to add.- Returns The that results from adding the specified number of years to the specified .
public CalendarAlgorithmType AlgorithmType { get; }
Gets a value that indicates whether the current calendar is solar-based, lunar-based, or a combination of both.
- Returns Always returns .
public int[] Eras { get; }
Gets the list of eras in the .
- Returns An array of integers that represents the eras in the .
public int GetDayOfMonth( DateTime time )
Returns the day of the month in the specified .
timeThe to read.- Returns An integer from 1 to 31 that represents the day of the month in the specified .
public DayOfWeek GetDayOfWeek( DateTime time )
Returns the day of the week in the specified .
timeThe to read.- Returns A value that represents the day of the week in the specified .
public int GetDayOfYear( DateTime time )
Returns the day of the year in the specified .
timeThe to read.- Returns An integer from 1 to 366 that represents the day of the year in the specified .
public int GetDaysInMonth( int year, int month, int era )
Returns the number of days in the specified month in the specified year in the specified era.
yearAn integer that represents the year.monthAn integer from 1 to 12 that represents the month.eraAn integer that represents the era.- Returns The number of days in the specified month in the specified year in the specified era.
public int GetDaysInYear( int year, int era )
Returns the number of days in the specified year in the specified era.
yearAn integer that represents the year.eraAn integer that represents the era.- Returns The number of days in the specified year in the specified era.
public int GetEra( DateTime time )
Returns the era in the specified .
timeThe to read.- Returns An integer that represents the era in the specified .
public int GetLeapMonth( int year, int era )
Calculates the leap month for a specified year and era.
yearA year.eraAn era.- Returns The return value is always 0 because the type does not support the notion of a leap month.
public int GetMonth( DateTime time )
Returns the month in the specified .
timeThe to read.- Returns An integer from 1 to 12 that represents the month in the specified .
public int GetMonthsInYear( int year, int era )
Returns the number of months in the specified year in the specified era.
yearAn integer that represents the year.eraAn integer that represents the era.- Returns The return value is always 12.
public int GetWeekOfYear( DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek )
Returns the week of the year that includes the date in the specified .
timeThe to read.ruleOne of the values that defines a calendar week.firstDayOfWeekOne of the values that represents the first day of the week.- Returns A 1-based integer that represents the week of the year that includes the date in the parameter.
public int GetYear( DateTime time )
Returns the year in the specified .
timeThe to read.- Returns An integer that represents the year in the specified .
public bool IsLeapDay( int year, int month, int day, int era )
Determines whether the specified date in the specified era is a leap day.
yearAn integer that represents the year.monthAn integer from 1 to 12 that represents the month.dayAn integer from 1 to 31 that represents the day.eraAn integer that represents the era.- Returns , if the specified day is a leap day; otherwise, .
public bool IsLeapMonth( int year, int month, int era )
Determines whether the specified month in the specified year in the specified era is a leap month.
yearAn integer that represents the year.monthAn integer from 1 to 12 that represents the month.eraAn integer that represents the era.- Returns This method always returns , unless overridden by a derived class.
public bool IsLeapYear( int year, int era )
Determines whether the specified year in the specified era is a leap year.
yearAn integer that represents the year.eraAn integer that represents the era.- Returns , if the specified year is a leap year; otherwise, .
public DateTime MaxSupportedDateTime { get; }
Gets the latest date and time supported by the current object.
- Returns The latest date and time supported by the type, which is equivalent to the last moment of December 31, 9999 C.E. in the Gregorian calendar.
public DateTime MinSupportedDateTime { get; }
Gets the earliest date and time supported by the current object.
- Returns The earliest date and time supported by the type, which is equivalent to the first moment of September 8, 1868 C.E. in the Gregorian calendar.
public DateTime ToDateTime( int year, int month, int day, int hour, int minute, int second, int millisecond, int era )
Returns a that is set to the specified date and time in the specified era.
yearAn integer that represents the year.monthAn integer from 1 to 12 that represents the month.dayAn integer from 1 to 31 that represents the day.hourAn integer from 0 to 23 that represents the hour.minuteAn integer from 0 to 59 that represents the minute.secondAn integer from 0 to 59 that represents the second.millisecondAn integer from 0 to 999 that represents the millisecond.eraAn integer that represents the era.- Returns The that is set to the specified date and time in the current era.
public int ToFourDigitYear( int year )
Converts the specified year to a four-digit year by using the property to determine the appropriate century.
yearAn integer (usually two digits) that represents the year to convert.- Returns An integer that contains the four-digit representation of .
public int TwoDigitYearMax { get; set; }
Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.
- Returns The last year of a 100-year range that can be represented by a 2-digit year.
public int GetMonthsInYear( int year )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public DateTime ToDateTime( int year, int month, int day, int hour, int minute, int second, int millisecond )
😔 No documentation found.
public bool IsLeapYear( int year )
😔 No documentation found.
public int GetLeapMonth( int year )
😔 No documentation found.
public bool IsLeapMonth( int year, int month )
😔 No documentation found.
public bool IsLeapDay( int year, int month, int day )
😔 No documentation found.
public int GetSecond( DateTime time )
😔 No documentation found.
public int GetMinute( DateTime time )
😔 No documentation found.
public JapaneseCalendar( )
😔 No documentation found.
public int GetHour( DateTime time )
😔 No documentation found.
public int GetDaysInYear( int year )
😔 No documentation found.
public int GetDaysInMonth( int year, int month )
😔 No documentation found.
public DateTime AddWeeks( DateTime time, int weeks )
😔 No documentation found.
public DateTime AddSeconds( DateTime time, int seconds )
😔 No documentation found.
public DateTime AddMinutes( DateTime time, int minutes )
😔 No documentation found.
public DateTime AddHours( DateTime time, int hours )
😔 No documentation found.
public DateTime AddDays( DateTime time, int days )
😔 No documentation found.
public DateTime AddMilliseconds( DateTime time, double milliseconds )
😔 No documentation found.
public object Clone( )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public double GetMilliseconds( DateTime time )
😔 No documentation found.
public bool IsReadOnly { get; }
😔 No documentation found.