Introduction >

UnitParser code (.NET/C#) >

NumberParser code (.NET/C#) >

DateParser code (.NET/C#) >

Time zones

FlexibleParser code

DateParser code (.NET/C#) >
Time zones
Additionally to extending the default .NET date/time (parsing) functionalities, another main feature of DateParser is having a comprehensive support for time zones. This part is eminently defined by a somehow complex set of hardcoded values and classifications. At the most generic level, the main classes are the following:
  • TimeZones which allows to deal with various time zones of different types at the same time.
  • Offset which provides a user-friendly format to deal with UTF offsets. Note that valid offset values are required to instantiate this class.
DateParser supports different types of time zones. All the main types have the same structure, defined by a class (inheriting from TimeZoneType) and an enum (implicitly convertible to that class), and are the following:DateParser has also some geography-related support for time zones. At the moment, only countries are fully supported through the classes Country and TimeZonesCountry. Other geographical entities like regions and cities are also partially supported via string recognition when instantiating some classes.