Overload implementation.

The arguments.

  • Parses a value into a Date object. The input is assumed to be in local time.

    Parameters

    • input: unknown

      The input to parse. Numbers are treated as UNIX timestamps (always UTC).

    Returns Date

    A Date object corresponding to the input, which might be an Invalid Date (i.e. getTime() will be NaN).

  • Parses a value into a Date object. The input is assumed to be in local time.

    Parameters

    • format: string | string[]
    • input: unknown

      The input to parse. Numbers are treated as UNIX timestamps (always UTC).

    Returns Date

    A Date object corresponding to the input, which might be an Invalid Date (i.e. getTime() will be NaN).

  • Parses a value into a Date object. The input is assumed to be in local time.

    Parameters

    • options: ParseOptions

      The options to use for parsing.

    • input: unknown

      The input to parse. Numbers are treated as UNIX timestamps (always UTC).

    Returns Date

    A Date object corresponding to the input, which might be an Invalid Date (i.e. getTime() will be NaN).