toki v0.1.0 Toki.DateTime

Summary

Types

date :: {year, month, day}
day :: 1..31
hour :: 0..23
minute :: 0..59
month :: 1..12
nanosecond :: 0..999999999
second :: 0..59
t :: %Toki.DateTime{day: day, hour: hour, minute: minute, month: month, nanosecond: nanosecond, second: second, year: integer}
timestamp :: {megasec :: pos_integer, sec :: pos_integer, microsec :: pos_integer}
year :: integer

Functions

add_day(date, value)
add_hour(date, value)
add_minute(date, value)
add_month(date, value)
add_second(date, value)
add_year(date, value)
format(date, pattern)

Specs

format(t, String.t) :: String.t
from_erlang_date(arg)

Specs

from_erlang_date(date) :: t
from_erlang_datetime(arg)

Specs

from_erlang_datetime(datetime) :: t
from_erlang_time(arg)

Specs

from_erlang_time(time) :: t
from_erlang_timestamp(value)

Specs

from_erlang_timestamp(timestamp) :: t
get_day(date)
get_hour(date)
get_minute(date)
get_month(date)
get_second(date)
get_year(date)
set_day(date, value)
set_hour(date, value)
set_minute(date, value)
set_month(date, value)
set_second(date, value)
set_year(date, value)
subtract_day(date, value)
subtract_hour(date, value)
subtract_minute(date, value)
subtract_month(date, value)
subtract_second(date, value)
subtract_year(date, value)
to_erlang_date(date)

Specs

to_erlang_date(t) :: date
to_erlang_datetime(date)

Specs

to_erlang_datetime(t) :: datetime
to_erlang_time(date)

Specs

to_erlang_time(t) :: time