C# Class System.Globalization.CCGregorianCalendar

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

This class is not compatible to T:Globalization.GregorianCalendar.

The fixed day number is also known as R.D. - rata die. Midnight at the onset of Monday, January 1, year 1 (Gregorian) is R.D. 1.

T:CCFixed
Mostrar archivo Open project: runefs/Marvin Class Usage Examples

Public Methods

Method Description
AddMonths ( System time, int months ) : System.DateTime

Adds months to the given date.

AddYears ( System time, int years ) : System.DateTime

Adds years to the given date.

GetDayOfMonth ( System time ) : int

Gets the of the month from time.

GetDayOfYear ( System time ) : int

The method gives the number of the day in the year.

GetDaysInMonth ( int year, int month ) : int

A method that gives the number of days of the specified month of the year.

GetDaysInYear ( int year ) : int

The method gives the number of days in the specified year.

GetMonth ( System time ) : int

The method gives the number of the month of the specified date.

GetYear ( System time ) : int

The method gives the number of the year of the specified date.

IsLeapDay ( int year, int month, int day ) : bool

A virtual method that tells whether the given day is a leap day.

ToDateTime ( int year, int month, int day, int hour, int minute, int second, int milliseconds ) : System.DateTime

A method that creates the T:System.DateTime from the parameters.

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

The method computes the difference between two Gregorian 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 Gregorian date.

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

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

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

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

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

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

year_from_fixed ( int date ) : int

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

Method Details

AddMonths() public static method

Adds months to the given date.
public static AddMonths ( System time, int months ) : System.DateTime
time System The /// to which to add /// months. ///
months int The number of months to add.
return System.DateTime

AddYears() public static method

Adds years to the given date.
public static AddYears ( System time, int years ) : System.DateTime
time System The /// to which to add /// months. ///
years int The number of years to add.
return System.DateTime

GetDayOfMonth() public static method

Gets the of the month from time.
public static GetDayOfMonth ( System time ) : int
time System The /// that specifies a /// date. ///
return int

GetDayOfYear() public static method

The method gives the number of the day in the year.
public static GetDayOfYear ( System time ) : int
time System The /// that specifies a /// date. ///
return int

GetDaysInMonth() public static method

A method that gives the number of days of the specified month of the year.
public static GetDaysInMonth ( int year, int month ) : int
year int An integer that gives the year in the current /// era.
month int An integer that gives the month, starting /// with 1.
return int

GetDaysInYear() public static method

The method gives the number of days in the specified year.
public static GetDaysInYear ( int year ) : int
year int An integer that gives the year. ///
return int

GetMonth() public static method

The method gives the number of the month of the specified date.
public static GetMonth ( System time ) : int
time System The /// that specifies a /// date. ///
return int

GetYear() public static method

The method gives the number of the year of the specified date.
public static GetYear ( System time ) : int
time System The /// that specifies a /// date. ///
return int

IsLeapDay() public static method

A virtual method that tells whether the given day is a leap day.
public static IsLeapDay ( int year, int month, int day ) : bool
year int An integer that specifies the year. ///
month int An integer that specifies the month. ///
day int An integer that specifies the day. ///
return bool

ToDateTime() public static method

A method that creates the T:System.DateTime from the parameters.
public static ToDateTime ( int year, int month, int day, int hour, int minute, int second, int milliseconds ) : System.DateTime
year int An integer that gives the year ///
month int An integer that specifies the month. ///
day int An integer that specifies the day. ///
hour int An integer that specifies the hour. ///
minute int An integer that specifies the minute. ///
second int An integer that gives the second. ///
milliseconds int An integer that gives the /// milliseconds. ///
return System.DateTime

date_difference() public static method

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

days_remaining() public static method

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

dmy_from_fixed() public static method

The method computes the Gregorian 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 Gregorian month. ///
year int The output value giving the Gregorian 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 Gregorian 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 /// Gregorian year. ///
year int An integer representing the Gregorian 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 Gregorian year. ///
return bool

month_from_fixed() public static method

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

year_from_fixed() public static method

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