Function dateFormat

  • Formats the specified date using the specified format mask.

    Parameters

    • date: string | number | Date

      Date to format.

    • mask: string

      Formatting mask string or DateFormatMaskOption to apply to date.

    • Optionalutc: boolean

      If true, use UTC time.

    Returns string

    The formatted date.

  • Formats the current date using the specified format mask.

    Parameters

    • mask: string

      Formatting mask string or DateFormatMaskOption to apply to date.

    • Optionalutc: boolean

      Use UTC for the current date.

    Returns string

    The formatted date.