C# Класс 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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

AddMonths() публичный статический Метод

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.
Результат System.DateTime

AddYears() публичный статический Метод

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.
Результат System.DateTime

GetDayOfMonth() публичный статический Метод

Gets the of the month from time.
public static GetDayOfMonth ( System time ) : int
time System The /// that specifies a /// date. ///
Результат int

GetDayOfYear() публичный статический Метод

The method gives the number of the day in the year.
public static GetDayOfYear ( System time ) : int
time System The /// that specifies a /// date. ///
Результат int

GetDaysInMonth() публичный статический Метод

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.
Результат int

GetDaysInYear() публичный статический Метод

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. ///
Результат int

GetMonth() публичный статический Метод

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. ///
Результат int

GetYear() публичный статический Метод

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. ///
Результат int

IsLeapDay() публичный статический Метод

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. ///
Результат bool

ToDateTime() публичный статический Метод

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. ///
Результат System.DateTime

date_difference() публичный статический Метод

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. ///
Результат int

day_from_fixed() публичный статический Метод

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. ///
Результат int

day_number() публичный статический Метод

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. ///
Результат int

days_remaining() публичный статический Метод

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. ///
Результат int

dmy_from_fixed() публичный статический Метод

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.
Результат void

fixed_from_dmy() публичный статический Метод

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. ///
Результат int

is_leap_year() публичный статический Метод

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. ///
Результат bool

month_from_fixed() публичный статический Метод

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. ///
Результат int

my_from_fixed() публичный статический Метод

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.
Результат void

year_from_fixed() публичный статический Метод

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. ///
Результат int