System.Globalization Namespace DateTimeFormatInfo Class
Returns the integer representing the specified era.
[ VB ] public Function GetEra ( _ ByVal eraName As String _ ) As Integer [ C# ] public int GetEra ( string eraName ); [ C++ ] public: int GetEra ( String* eraName ); [ JScript ] function GetEra ( eraName : String ) : int;
The integer representing the era, if eraName is valid; otherwise, -1.
The era name is the name a calendar uses to refer to a period of time reckoned from a fixed point or event. For example, "A.D." or "C.E." is the current era in the Gregorian calendar.
The comparison with eraName is case-insensitive; for example, "A.D." is equivalent to "a.d.".
If the GregorianCalendar is selected in DateTimeFormatInfo.Calendar, DateTimeFormatInfo ignores punctuation in abbreviated era names; that is, "A.D." is equivalent to "AD".
GetEra compares eraName with the full era name returned by GetEraName and with the abbreviated era name returned by GetAbbreviatedEraName.
DateTimeFormatInfo Members GetEraName Calendar
© 2000-2010 Rey Nuñez All rights reserved.If you have any question, comment or suggestion about this site, please send us a note
You can help support asp.net.ph