timex v3.0.1 Timex.Time
This module provides helper functions for working with Times
Summary
Functions
Converts an hour between 0..24 to {1..12, :am/:pm}
Converts an hour between 1..12 in either am or pm, to value between 0..24
Functions
Specs
to_12hour_clock(0..24) :: {1..12, :am | :pm}
Converts an hour between 0..24 to {1..12, :am/:pm}
Examples
iex> Timex.Time.to_12hour_clock(23) {11, :pm}