• JMap.Util.Date.format

    Returns a formatted string from a date.

    Parameters

    Returns string

    Throws

    if date is not a Date object, or ISO string, or timestamp number

    Example

    // returns the current date as a string, according to the current user locale
    JMap.Util.Date.format(new Date())

    // returns the current date as a string, with time, according to the current user locale
    JMap.Util.Date.format(new Date(), {
    displayTime: true
    })