C# Class System.Globalization.CCHijriCalendar

A class encapsulating the functions of the Islamic calendar as static methods.

There is no difference here in using Hijri or Islamic calendar.

The epoch of the Islamic calendar isn't fixed, because we cannot surely say today, when the crescent of the new moon has been observed around the July 16, 622 C.E. Julian. Even today the start and end of the month Ramadan is defined by religous authorities. So the calendar can be offset by two days.

We don't support the offset here, however we changed the epoch from "Calendrical Calculations" to value, that .Net seems to be using.

This class is not compatible to T:System.Globalization.HijriCalendar.

T:CCFixed
Show file Open project: runefs/Marvin Class Usage Examples

Public Methods

Method Description
date_difference ( int dayA, int monthA, int yearA, int dayB, int monthB, int yearB ) : int

The method computes the difference between two Islamic dates.

day_from_fixed ( int date ) : int

A method computing the day of the month from a fixed day number.

day_number ( int day, int month, int year ) : int

The method computes the number of the day in the year from a Islamic date.

days_remaining ( int day, int month, int year ) : int

The method computes the days remaining in the given Islamic year from a Islamic date.

dmy_from_fixed ( int &day, int &month, int &year, int date ) : void

The method computes the Islamic year, month, and day from a fixed day number.

fixed_from_dmy ( int day, int month, int year ) : int

The method returns the fixed day number of the given Islamic date.

is_leap_year ( int year ) : bool

The method tells whether the year is a leap year.

month_from_fixed ( int date ) : int

A method computing the Islamic month from a fixed day number.

my_from_fixed ( int &month, int &year, int date ) : void

The method computes the Islamic year and month from a fixed day number.

year_from_fixed ( int date ) : int

The method computes the Islamic year from a fixed day number.

Method Details

date_difference() public static method

The method computes the difference between two Islamic dates.
public static date_difference ( int dayA, int monthA, int yearA, int dayB, int monthB, int yearB ) : int
dayA int The integer parameter gives the day of month /// of the first date. ///
monthA int The integer parameter gives the Islamic /// month of the first date. ///
yearA int The integer parameter gives the Islamic /// year of the first date. ///
dayB int The integer parameter gives the day of month /// of the second date. ///
monthB int The integer parameter gives the Islamic /// month of the second date. ///
yearB int The integer parameter gives the Islamic /// year of the second date. ///
return int

day_from_fixed() public static method

A method computing the day of the month from a fixed day number.
public static day_from_fixed ( int date ) : int
date int An integer specifying the fixed day number. ///
return int

day_number() public static method

The method computes the number of the day in the year from a Islamic date.
public static day_number ( int day, int month, int year ) : int
day int An integer representing the day of the month, /// counting from 1. ///
month int An integer representing the month in the /// Islamic year. ///
year int An integer representing the Islamic year. ///
return int

days_remaining() public static method

The method computes the days remaining in the given Islamic year from a Islamic date.
public static days_remaining ( int day, int month, int year ) : int
day int An integer representing the day of the month, /// counting from 1. ///
month int An integer representing the month in the /// Islamic year. ///
year int An integer representing the Islamic year. /// Non-positive values are allowed also. ///
return int

dmy_from_fixed() public static method

The method computes the Islamic year, month, and day from a fixed day number.
public static dmy_from_fixed ( int &day, int &month, int &year, int date ) : void
day int The output value returning the day of the /// month. ///
month int The output value giving the Islamic month. ///
year int The output value giving the Islamic year. ///
date int An integer value specifying the fixed day /// number.
return void

fixed_from_dmy() public static method

The method returns the fixed day number of the given Islamic date.
public static fixed_from_dmy ( int day, int month, int year ) : int
day int An integer representing the day of the month, /// counting from 1. ///
month int An integer representing the month in the /// Islamic year. ///
year int An integer representing the Islamic year. /// Non-positive values are allowed also. ///
return int

is_leap_year() public static method

The method tells whether the year is a leap year.
public static is_leap_year ( int year ) : bool
year int An integer representing the Islamic year. ///
return bool

month_from_fixed() public static method

A method computing the Islamic month from a fixed day number.
public static month_from_fixed ( int date ) : int
date int An integer specifying the fixed day number. ///
return int

my_from_fixed() public static method

The method computes the Islamic year and month from a fixed day number.
public static my_from_fixed ( int &month, int &year, int date ) : void
month int The output value giving the Islamic month. ///
year int The output value giving the Islamic year. ///
date int An integer value specifying the fixed day /// number.
return void

year_from_fixed() public static method

The method computes the Islamic year from a fixed day number.
public static year_from_fixed ( int date ) : int
date int The fixed day number. ///
return int