Skip to main content

getDateTimeFrom

Stentor API Reference


Stentor API Reference / stentor-utils/src / getDateTimeFrom

Function: getDateTimeFrom()

getDateTimeFrom(date, includeOnly?): DateTime

Defined in: packages/stentor-utils/src/dateTime.ts:161

From a Dialogflow style ISO-8601 time string: "2019-06-05T12:00:00-04:00", it pulls out the date and the time.

Parameters​

date​

string | Date

includeOnly?​

"time" | "date"

Returns​

DateTime

A DateTime object based on the provided parameters