toDateString Function

Format a date in a display string, optionally converting to time zone, if specified by timeZoneOffset

toDateString(date: Date, timeZoneOffset?: number): string

Parameter Type Description
date Date Date object to format
timeZoneOffset number optional: offset from UTC to use for conversion

Returns - string

formatted date string

Defined in

Last Updated: 29 November, 2022