C# Class System.Globalization.CCJulianCalendar

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

The algorithms don't support a year 0. Years before Common Era (B.C.E. or B.C.) are negative and years of Common Era (C.E. or A.D.) are positive.

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

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 Julian 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 Julian date.

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

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

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

The method computes the Julian 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 Julian 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 Julian month from a fixed day number.

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

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

year_from_fixed ( int date ) : int

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

Method Details

date_difference() public static method

The method computes the difference between two Julian 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 Julian /// month of the first date. ///
yearA int The integer parameter gives the Julian /// 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 Julian /// month of the second date. ///
yearB int The integer parameter gives the Julian /// 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 Julian 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 /// Julian year. ///
year int An integer representing the Julian year. /// Negative values are allowed also. ///
return int

days_remaining() public static method

The method computes the days remaining in the given Julian year from a Julian 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 /// Julian year. ///
year int An integer representing the Julian year. /// Negative values are allowed also. ///
return int

dmy_from_fixed() public static method

The method computes the Julian 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 Julian month. ///
year int The output value giving the Julian 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 Julian 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 /// Julian year. ///
year int An integer representing the Julian year. /// Positive and Negative values are allowed. ///
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 Julian year. ///
return bool

month_from_fixed() public static method

A method computing the Julian 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 Julian 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 Julian month. ///
year int The output value giving the Julian year. ///
date int An integer value specifying the fixed day /// number.
return void

year_from_fixed() public static method

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