toISOString
The toISOString() function transforms a TheDate into an ISO 8601 string (YYYY-MM-DDTHH:mm:ss.sssZ).
Interactive example
Syntax
typescript
function toISOString<
GenericInput extends TheDate
>(
input: GenericInput
): stringParameters
input: The date to convert.
Return value
An ISO 8601 string representing the date.
