Skip to content

SudoSOS Back-end API / helpers / asDate

Function: asDate() ​

ts
function asDate(input): Date;

Converts the input to a Date object.

Parameters ​

ParameterTypeDescription
inputanyThe input which should be converted.

Returns ​

Date

The parsed Date object.

Throws ​

TypeError - If the input is not a valid date.