Function formatDate

  • Returns a localized string representation of this date, according to the given format string. Format codes use the same specification as moment.

    See

    List of formats

    Example

    formatDate(new Date(), 'MM/DD/YYYY') // '10/31/2022'
    

    Parameters

    • formatStr: string
    • date: Date
    • Optional locale: string

    Returns string

Generated using TypeDoc