View Source Azan.TimeComponent (AzanEx v0.1.0)
Documentation for TimeComponent
.
Link to this section Summary
Functions
Create a DateTime from TimeComponent
Create a new TimeComponent
from an hour with fractional part.
Convert a TimeComponent
to a string in the format of "HH:MM".
Link to this section Types
Link to this section Functions
Create a DateTime from TimeComponent
## Examples
iex> TimeComponent.new(12.5) |> TimeComponent.create_utc_datetime(2015, 1, 1)
~U[2015-01-01 12:30:00Z]
Create a new TimeComponent
from an hour with fractional part.
## Examples
iex> TimeComponent.new(12.5)
%TimeComponent{hour: 12, minute: 30, second: 0}
Convert a TimeComponent
to a string in the format of "HH:MM".
## Examples
iex> TimeComponent.new(12.5) |> TimeComponent.to_hm_string()
"12:30"