Function parseAcceptDateTime

  • Parses an Accept-DateTime header string.

    Parameters

    • input: string

      The Accept-DateTime header string.

    • strict: boolean = false

      Determines if invalid values throw errors (true) or log warnings (false). Defaults to false.

    Returns AcceptDatetime[]

    An array with a single AcceptDatetime object, or an empty array if a range in an invalid format is detected.