C# Class System.Globalization.CCGregorianEraHandler

Mostrar archivo Open project: runefs/Marvin Class Usage Examples

Public Methods

Method Description
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.

Method Details

CCGregorianEraHandler() public method

Constructor.
public CCGregorianEraHandler ( ) : System.Collections
return System.Collections

CheckDateTime() public method

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. ///
return void

EraYear() public method

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. ///
return int

GregorianYear() public method

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. ///
return int

ValidDate() public method

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. ///
return bool

ValidEra() public method

The method tests, whether the era number does exist.
public ValidEra ( int era ) : bool
era int An integer giving the era number. ///
return bool

appendEra() public method

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. ///
return void

appendEra() public method

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. ///
return void