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

GregorianYear() public method

This method computes the Gregorian year from the year of this era.
/// The exception is thrown if the year isn't valid in this /// era. ///
public GregorianYear ( int year ) : int
year int An integer giving the year in the /// era. ///
return int
		public int GregorianYear(int year) {
			if (year < 1 || year > _maxYear) {
				System.IO.StringWriter sw = 
					new System.IO.StringWriter();
				sw.Write(
					"Valid Values are between " +
					"{0} and {1}, inclusive.",
					1, _maxYear);
				throw new System.ArgumentOutOfRangeException(
					"year", sw.ToString());
			}
			return year + _gregorianYearStart - 1;
		}