Function parse

  • Parse the supplied dateTime assuming the given format.

    Parameters

    • dateTimeString: string

      The string to parse

    • formatString: string

      The formatting string to be applied

    • Optional overrideZone: null | TimeZone

      Use this zone in the result

    • allowTrailing: boolean = true

      Allow trailing characters in the source string

    • locale: PartialLocale = {}

      Locale-specific constants such as month names

    Returns AwareTimeStruct

    string

    Throws

    timezonecomplete.ParseError if the given dateTimeString is wrong or not according to the pattern

    Throws

    timezonecomplete.Argument.FormatString if the given format string is invalid

Generated using TypeDoc