Skip to main content

isISO8601Range

Stentor API Reference


Stentor API Reference / stentor-utils/src / isISO8601Range

Function: isISO8601Range()

isISO8601Range(potential): boolean

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

Determines if the string is an ISO-8601 range style string.

This does not cover the entire 8601 spec, just a version that is commonly used by NLUs to communicate date & time.

isISO8601 https://en.wikipedia.org/wiki/ISO_8601#Time_intervals

Parameters​

potential​

string

Returns​

boolean

True if the string confirms to ISO-8601 range format