simplestatex v0.3.0 SimpleStatEx.Util.HandleTime

Helps handle time as it pertains to roll-ups and statistics generally

Link to this section Summary

Functions

Return a string from a period atom if it is a supported period

Round a datetime into the current day and return as a datetime

Link to this section Functions

Link to this function period_to_string!(period)
Link to this function period_to_string(period)

Return a string from a period atom if it is a supported period.

Examples

iex> SimpleStatEx.Util.HandleTime.period_to_string(:hourly) “hourly”

Link to this function round(arg1, time)

Round a datetime into the current day and return as a datetime

Examples

iex> SimpleStatEx.Util.HandleTime.round(:daily, #DateTime<2018-01-10 04:54:07.313053Z>)

 #DateTime<2018-01-10 00:00:00.000000Z>