Liking cljdoc? Tell your friends :D

metabase.query-processor.middleware.parameters.dates

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.
raw docstring

date-string->filterclj

(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.
sourceraw docstring

date-string->rangeclj

(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.
sourceraw docstring

date-type?clj

(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`?
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close