C# Класс System.Globalization.CCGregorianEraHandler

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CCGregorianEraHandler ( ) : System.Collections

Constructor.

CheckDateTime ( System time ) : void

The method checks whether a given T:System.DateTime is covered by any era.

EraYear ( int &era, int date ) : int

This function returns the year of the era and sets the era in an output parameter.

GregorianYear ( int year, int era ) : int

This method computes the Gregorian year from the year of the given era.

ValidDate ( int date ) : bool

The method tests whether a given fixed day number is covered by any era.

ValidEra ( int era ) : bool

The method tests, whether the era number does exist.

appendEra ( int nr, int rd_start ) : void

Method adds a yet not-ended era to the GregorianEraHandler instance.

appendEra ( int nr, int rd_start, int rd_end ) : void

Method adds an era to the GregorianEraHandler instance.

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

CCGregorianEraHandler() публичный Метод

Constructor.
public CCGregorianEraHandler ( ) : System.Collections
Результат System.Collections

CheckDateTime() публичный Метод

The method checks whether a given T:System.DateTime is covered by any era.
/// The exception is thrown if the argument isn't inside the time /// span of any era. ///
public CheckDateTime ( System time ) : void
time System A /// giving the date and time. ///
Результат void

EraYear() публичный Метод

This function returns the year of the era and sets the era in an output parameter.
/// The exception is thrown if the fixed day number is outside of the /// time spans of all eras. ///
public EraYear ( int &era, int date ) : int
era int An output parameter returning the /// era number. ///
date int An integer giving the fixed day /// number. ///
Результат int

GregorianYear() публичный Метод

This method computes the Gregorian year from the year of the given era.
/// The exception is thrown if the year isn't valid in this /// era. ///
public GregorianYear ( int year, int era ) : int
year int An integer giving the year in the /// era. ///
era int An integer giving the era number. ///
Результат int

ValidDate() публичный Метод

The method tests whether a given fixed day number is covered by any era.
public ValidDate ( int date ) : bool
date int An integer representing the fixed day number. ///
Результат bool

ValidEra() публичный Метод

The method tests, whether the era number does exist.
public ValidEra ( int era ) : bool
era int An integer giving the era number. ///
Результат bool

appendEra() публичный Метод

Method adds a yet not-ended era to the GregorianEraHandler instance.
public appendEra ( int nr, int rd_start ) : void
nr int The integer number of the era. ///
rd_start int The fixed day number defining the /// first day of the era. ///
Результат void

appendEra() публичный Метод

Method adds an era to the GregorianEraHandler instance.
public appendEra ( int nr, int rd_start, int rd_end ) : void
nr int The integer number of the era. ///
rd_start int The fixed day number defining the /// first day of the era. ///
rd_end int The fixed day number that defines the /// last day of the era. ///
Результат void