code_corps v0.0.1 CodeCorps.Validators.TimeValidator View Source
Used for validating timestamp fields in a given changeset.
Link to this section Summary
Functions
Validates the new time is not before the previous time
Link to this section Functions
Link to this function
truncate(datetime, precision)
View Source
truncate(DateTime.t(), :microsecond | :millisecond | :second) :: DateTime.t()
Validates the new time is not before the previous time.
Works at second-level accuracy by truncating both timestamps to the second.