delphirtl

delphirtlDocs


delphirtl / TryStrToDate

Function: TryStrToDate()

TryStrToDate(S): [boolean, Date | undefined]

Parses the given string as a date, drops any time given

const [success, date] = TryStrToDate(SomeStr);
if (success) {
  // ...date is valid!
}

Parameters

S: string

Returns

[boolean, Date | undefined]

Defined in

src/sysutils.ts:1165