Skip to content

SiDateRangeCalculationService documentation

provided in root

Service to transform and calculate with DateRangeFilter objects.

Attributes and Methods

NameTypeDefaultDescription
removeTime(...)
(date: Date) => DateUtility to reset the time attributes to 0 (hours/minutes/seconds/milliseconds).

Parameters
resolveDateRangeFilter(...)
(filter: DateRangeFilter, options: ResolveDateRangeOptions) => ResolvedDateRangeCalculates the start and end dates of a DateRangeFilter.
Returns The resolved result in form of a ResolvedDateRange object.

Parameters

Types Documentation

Properties
end: Date
start: Date
valid: boolean
Properties
point1: (Date | "now")
point2: (number | Date)
range?: ("after" | "before" | "within")
Properties
Skip normalization? When skipped, point1 will always be start , point2 will be end
skipNormalization?: boolean
Resolve time? When set to false, hours/minutes/seconds/ms are set to zero
withTime?: boolean = true

Except where otherwise noted, content on this site is licensed under MIT License.