Function isoDateTimestamp

  • Converts a given date to an ISO date timestamp string. If no date is provided, the current date and time will be used.

    Parameters

    • date: Date = ...

    Returns string

    The ISO date timestamp string.

    Example

    isoDateTimestamp(new Date('2020-01-01T00:00:00Z'));;
    //=> "20200101T000000Z"

    Example

    const timestamp = isoDateTimestamp();
    console.log(timestamp); // Outputs the current date and time in ISO format, e.g. "20210520T102030Z"

Generated using TypeDoc