MCPcopy Create free account
hub / github.com/deepnote/deepnote / isValidRelativeDateInterval

Function isValidRelativeDateInterval

packages/blocks/src/blocks/input-blocks.ts:52–54  ·  view source on GitHub ↗
(value: DateRangeInputValue)

Source from the content-addressed store, hash-verified

50}
51
52export function isValidRelativeDateInterval(value: DateRangeInputValue): value is DateIntervalString {
53 return typeof value === 'string' && DATE_RANGE_INPUT_RELATIVE_RANGES.some(range => range.value === value)
54}
55
56export function isValidAbsoluteDateRange(value: DateRangeInputValue): value is DateTimeStringArray {
57 const YYYY_MM_DD_REGEX = /^\d{4}-\d{2}-\d{2}$/

Calls

no outgoing calls

Tested by

no test coverage detected