class HijriCalendar
in global :: System . Globalization
Represents the Hijri calendar.
public DateTime AddMonths( DateTime time, int months )
Returns a that is the specified number of months away from the specified .
timeThe to add months to.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 add years to.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 30 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 355 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 of the specified year and 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 and era.
yearAn integer that represents the year.eraAn integer that represents the era.- Returns The number of days in the specified year and era. The number of days is 354 in a common year or 355 in a leap year.
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. Specify or .- Returns 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 and era.
yearAn integer that represents the year.eraAn integer that represents the era.- Returns The number of months in the specified year and era.
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 int HijriAdjustment { get; set; }
Gets or sets the number of days to add or subtract from the calendar to accommodate the variances in the start and the end of Ramadan and to accommodate the date difference between countries/regions.
- Returns An integer from -2 to 2 that represents the number of days to add or subtract from the calendar.
public static int HijriEra
Represents the current era. This field is constant.
public bool IsLeapDay( int year, int month, int day, int era )
Determines whether the specified date 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 30 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 and 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 .
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 this calendar.
- 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 this calendar.
- Returns The earliest date and time supported by the type, which is equivalent to the first moment of July 18, 622 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, time, and era.
yearAn integer that represents the year.monthAn integer from 1 to 12 that represents the month.dayAn integer from 1 to 30 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.
yearA two-digit or four-digit integer 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 GetHashCode( )
😔 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 GetWeekOfYear( DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek )
😔 No documentation found.
public int GetSecond( DateTime time )
😔 No documentation found.
public int GetMonthsInYear( int year )
😔 No documentation found.
public object Clone( )
😔 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 HijriCalendar( )
😔 No documentation found.
public bool IsReadOnly { get; }
😔 No documentation found.
public double GetMilliseconds( DateTime time )
😔 No documentation found.
public int GetMinute( DateTime time )
😔 No documentation found.