Skip to content

@technobuddha > library > Time > Parsing

Function: parseDate()

ts
function parseDate(input: string): Date;

Defined in: parse-date.ts:68

Parse a string into a Date object

Parameters

ParameterTypeDescription
inputstringThe string containing a date

Returns

Date

new Date object

Remarks

this is a little more generous about what formats it will take for a date, and if it can't match the input to one of it's supported formats it falls back to new Date(text)