date() = calendar:date()
datetime() = {date, calendar:datetime()}
parse_error() = {invalid_date, bad_timezone} | {invalid_date, bad_datetime} | {invalid_date, wrong_weekday} | {invalid_date, {incorrect_date, triplet()}} | {invalid_date, {incorrect_time, triplet()}} | {invalid_date, no_datetime}
parse_result() = {ok, datetime()} | {error, parse_error()}
time() = calendar:time()
triplet() = {non_neg_integer(), non_neg_integer(), non_neg_integer()}
assemble/1 | Serialize Date header to iolist. |
assemble_bin/1 | Serialize Date header to binary. |
build/2 | Build SIP header. |
date/1 | Extract date from Date header (GMT). |
is_valid/1 | Check that Erlang term is valid Date header. |
make/1 | Make Date header from binary, raw representation of Date or from raw SIP header. |
make/2 | Make date header from date and time. |
now/0 | Date header for current moment of time. |
parse/1 | Parse Date header from binary or from raw SIP header. |
raw/1 | Raw representation of Date header.. |
time/1 | Extract time from Time header (GMT). |
assemble(DT::datetime()) -> iolist()
Serialize Date header to iolist.
assemble_bin(DT::datetime()) -> binary()
Serialize Date header to binary.
build(HeaderName::binary(), DateTime::datetime()) -> ersip_hdr:header()
Build SIP header.
date(X1::datetime()) -> date()
Extract date from Date header (GMT).
is_valid(DT::term()) -> boolean()
Check that Erlang term is valid Date header.
make(Bin::binary() | ersip_hdr:header()) -> datetime()
Make Date header from binary, raw representation of Date or from raw SIP header. If syntax is invalid then this function raises error.
make(Date::date(), Time::time()) -> datetime()
Make date header from date and time.
now() -> datetime()
Date header for current moment of time.
parse(Bin::binary() | ersip_hdr:header()) -> parse_result()
Parse Date header from binary or from raw SIP header.
raw(X1::datetime()) -> raw()
Raw representation of Date header..
time(X1::datetime()) -> time()
Extract time from Time header (GMT).