LiveFilter.DateUtils (LiveFilter v0.1.0)

View Source

Date utility functions for LiveFilter. Handles date range calculations for presets and custom ranges.

Summary

Functions

Converts a date range to the specified timestamp type.

Converts a single date/datetime to the specified type. For ranges, use :start for beginning of day and :end for end of day.

Converts a date preset string or date range tuple to a proper date range. Supports optional timestamp_type parameter for converting dates to timestamps.

Functions

convert_range_to_type(arg, type)

Converts a date range to the specified timestamp type.

convert_to_type(date, atom, position)

Converts a single date/datetime to the specified type. For ranges, use :start for beginning of day and :end for end of day.

parse_date_range(value, timestamp_type \\ :date)

Converts a date preset string or date range tuple to a proper date range. Supports optional timestamp_type parameter for converting dates to timestamps.