System.Globalization.CCGregorianEraHandler.Era.Era C# (CSharp) Method

Era() public method

This constructor creates the era structure.
public Era ( int nr, int start, int end ) : System.Collections
nr int The integer number of the era. ///
start int The fixed day number defining the /// first day of the era. ///
end int The fixed day number that defines the /// last day of the era. ///
return System.Collections
		public Era(int nr, int start, int end) {
			if (nr == 0)
				throw new System.ArgumentException(
					"Era number shouldn't be zero.");
			_nr = nr;
			if (start > end) {
				throw new System.ArgumentException(
					"Era should start before end.");
			}
			_start = start;
			_end = end;

			_gregorianYearStart =
				CCGregorianCalendar.year_from_fixed(_start);
			int gregorianYearEnd =
				CCGregorianCalendar.year_from_fixed(_end);
			_maxYear = gregorianYearEnd - _gregorianYearStart + 1;
		}