Module increment

Source
Expand description

This module provides logic for validating rounding increments.

Each of the types we support rounding for have their own logic for how the rounding increment is validated. For example, when rounding timestamps, only rounding increments up to hours are supported. But when rounding datetimes, rounding increments up to days are supported. Similarly, rounding increments for time units must divide evenly into 1 unit of the next highest unit.

Functionsยง

for_datetime ๐Ÿ”’
Validates the given rounding increment for the given unit.
for_span ๐Ÿ”’
Validates the given rounding increment for the given unit.
for_time ๐Ÿ”’
Validates the given rounding increment for the given unit.
for_timestamp ๐Ÿ”’
Validates the given rounding increment for the given unit.
get_with_limit ๐Ÿ”’
get_with_max ๐Ÿ”’