View Source Luminous.TimeRangeSelector behaviour (luminous v0.1.0)
a selector represents the widget in the dashboard that allows for selecting a time range/period
it is defined at compile time and populated at compile time (current value)
it can also be updated with a new value
Link to this section Summary
Callbacks
this behaviour needs to be implemented by the module that is passed to define/2
Functions
Calculates and returns the time range for the given preset in the given time zone.
Link to this section Types
Link to this section Callbacks
@callback default_time_range(time_zone()) :: Luminous.TimeRange.t()
this behaviour needs to be implemented by the module that is passed to define/2
Link to this section Functions
@spec default_time_range(t(), time_zone()) :: Luminous.TimeRange.t()
@spec get_time_range_for(t(), preset(), time_zone()) :: Luminous.TimeRange.t()
Calculates and returns the time range for the given preset in the given time zone.
@spec presets() :: [preset()]
@spec update_current(t(), Luminous.TimeRange.t()) :: t()