Shared code for handling datetime parameters, used by both MBQL and native params implementations.
Shared code for handling datetime parameters, used by both MBQL and native params implementations.
(date-string->filter date-string field)
Inputs: [date-string :- s/Str field :- (s/cond-pre su/IntGreaterThanZero mbql.s/Field)] Returns: mbql.s/Filter
Takes a string description of a date (not datetime) range such as 'lastmonth' or '2016-07-15~2016-08-6' and returns a corresponding MBQL filter clause for a given field reference.
Inputs: [date-string :- s/Str field :- (s/cond-pre su/IntGreaterThanZero mbql.s/Field)] Returns: mbql.s/Filter Takes a string description of a *date* (not datetime) range such as 'lastmonth' or '2016-07-15~2016-08-6' and returns a corresponding MBQL filter clause for a given field reference.
(date-string->range date-string report-timezone)
Takes a string description of a date range such as 'lastmonth' or '2016-07-15~2016-08-6' and return a MAP with
:start
and :end
as iso8601 string formatted dates, respecting the given timezone.
Takes a string description of a date range such as 'lastmonth' or '2016-07-15~2016-08-6' and return a MAP with `:start` and `:end` as iso8601 string formatted dates, respecting the given timezone.
(date-type? param-type)
Inputs: [param-type :- s/Keyword]
Is param type :date
or some subtype like :date/month-year
?
Inputs: [param-type :- s/Keyword] Is param type `:date` or some subtype like `:date/month-year`?
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close