parseDate

Converts a string to a Date object based on the specified format and locale.

Parameters

value string

Defines the string that will be parsed.

format? string | DateFormatOptions | string[] | DateFormatOptions[]

Defines a string that represents a predefined or custom date format, a configuration object, or an array of formats that should be used to parse the value.

locale? string

The optional locale id. If not specified, the id of the "en" locale is used.

Returns

Date - The parsed date.