View Source ExTeal.Metric.Ranges (ExTeal v0.27.0)

Helper functions for building time intervals and queries based on the params of a request.

Summary

Functions

Set the boundaries of an aggregate queries

Parse the start and end params

Types

@type between_options() :: [
  start_dt: DateTime.t(),
  end_dt: DateTime.t(),
  metric: module()
]

Functions

Set the boundaries of an aggregate queries

Link to this function

get_aggregate_datetimes(request)

View Source
@spec get_aggregate_datetimes(request :: ExTeal.Metric.Request.t()) ::
  {start_dt :: DateTime.t(), end_dt :: DateTime.t()}

Parse the start and end params

Link to this function

parse_dt(param, format, timezone)

View Source
@spec parse_dt(String.t(), String.t(), String.t()) :: DateTime.t()