evalidate_calendar (evalidate v0.1.0)

View Source

Summary

Types

date/0

-type date() :: {year(), month(), day()} | 0..253402214400.

datetime/0

-type datetime() :: {date(), time()} | 0..253402300799.

day/0

-type day() :: 1..31.

format/0

-type format() :: tuple | binary | seconds | timestamp.

hour/0

-type hour() :: 0..23.

minute/0

-type minute() :: 0..59.

month/0

-type month() :: 1..12.

option/0

-type option() :: {format, format()}.

options/0

-type options() :: [option()].

second/0

-type second() :: 0..59.

time/0

-type time() :: {hour(), minute(), second()} | 0..86399.

year/0

-type year() :: 1970..9999.

Functions

date(Date, Opts)

-spec date(Date, Opts) -> evalidate:validator_return() when Date :: binary() | date(), Opts :: options().

datetime(Date, Opts)

-spec datetime(Date, Opts) -> evalidate:validator_return()
                  when Date :: binary() | datetime(), Opts :: options().

time(Time, Opts)

-spec time(Time, Opts) -> evalidate:validator_return() when Time :: binary() | time(), Opts :: options().