Newer Version Available

This content describes an older version of this product. View Latest

toISOString()

Deprecated. Use Date.toISOString() instead.

Signature

toISOString(Date | T date)

Parameters

date
Type: Date | T
A Date object.
unit
Type: string
A datetime unit. Options are 'year', 'month', 'week', 'day', 'hour', 'minute', or 'second'.

Returns

Type: Date
An ISO8601 string.