Skip to main content

toISOString()

function toISOString(date): ISOString;

Creates an ISO string from a Date object

Parameters

ParameterTypeDescription
dateDateThe Date object to convert

Returns

ISOString

ISO string representation

Throws

Error if the date is invalid