Skip to content

SudoSOS Back-end API / helpers / asFromAndTillDate

Function: asFromAndTillDate() ​

ts
function asFromAndTillDate(fromDate, tillDate): object;

Converts the inputs to a from and till date

Parameters ​

ParameterTypeDescription
fromDateany-
tillDateany-

Returns ​

object

fromDate ​

ts
fromDate: Date;

tillDate ​

ts
tillDate: Date;

Throws ​

Error - If tillDate is before fromDate

Throws ​

TypeError - If any of the inputs is not a valid date