Optional
options: ITimeOptionsOptional
maxOptional
minReceives a date string or date object, validates it against the specified time options, and generates a formatted query string for usage as URL query parameter.
The date-like string or date object to be parsed and converted.
A formatted query string, or an empty string if the date is invalid.
Generates a formatted query string from a provided date range for usage as URL query parameter. The provided dates are shortened to fit the defined resolution.
The lower bound of the time range as a date-like string or date object.
The upper bound of the time range as a date-like string or date object.
A formatted query string, or an empty string if the dates are invalid.
Helper method to quickly generate a formated query string from the default time restriction provided by the time options.
The formatted defaults as query string or undefined if no defaults are available.
Simple date transform method from a date-like string to a date object without validating it against the time options.
The date string to be parsed.
The resulting Date object if the input is valid, otherwise undefined.
Static
formatStatic
formatStatic
formatFormats a given date into a string, representing the week range from Monday to Sunday that the date falls into.
Static
formatStatic
queryFormats a date range as a string, separated by a forward slash and taking the resolution into account when defining the precision of the date strings.
The starting date of the range.
The ending date of the range.
The resolution of the date range, can be 'day', 'week', 'month', or 'year'.
A query string representing the date range formatted according to the specified resolution.
Static
queryConstructs a query string based on a single date value and a specified time resolution.
The date value to be formatted.
The time resolution specifying the format (e.g. day, week, month, year).
A formatted string representation of the date based on the provided resolution.
A class for formatting date and time values based on an
ITimeOption
object. Provides utility functions for parsing dates and date ranges, validating them, and generating formatted query strings for temporal layer filtering.The class allows customized configurations through its constructor options, including setting minimum and maximum date bounds, default values, resolution levels, and operation modes.