Copyright © Copyright (c) 2008-2009 Rusty Klophaus, Copyright (c) 2009 Marc Worrell
Authors: Rusty Klophaus.
clean_lower/1 | Convert to lower case, strip surrounding whitespace. |
convert_json/1 | Convert json from facebook favour to an easy to use format for zotonic templates. |
ip_to_list/1 | |
ip_to_long/1 | Convert an IP address from a string, IPv4 tuple or IPv6 tuple to the big endian integer representation. |
long_to_ip/1 | Convert long int to IP address tuple. |
to_atom/1 | Convert (almost) any value to an atom. |
to_binary/1 | Convert (almost) any value to an atom. |
to_binary/2 | |
to_bool/1 | Quite loose conversion of values to boolean. |
to_bool_strict/1 | Convert values to boolean values according to the Django rules. |
to_date/1 | Convert an input to a date. |
to_datetime/1 | Convert an input to a (universal) datetime, using to_date/1 and to_time/1. |
to_flatlist/1 | Flatten list and convert to string. |
to_float/1 | Convert (almost) any value to a float. |
to_integer/1 | Convert (almost) any value to an integer. |
to_isotime/1 | Convert a datetime (in universal time) to an ISO time string. |
to_json/1 | Convert an Erlang structure to a format that can be serialized by mochijson. |
to_list/1 | Convert (almost) any value to a list. |
to_localtime/1 | Convert a utc date time to local. |
to_time/1 | Convert an input to a time. |
to_utc/1 | Convert a local date time to utc. |
unicode_to_utf8/1 |
clean_lower(L::binary() | list() | atom()) -> binary()
Convert to lower case, strip surrounding whitespace.
convert_json(L) -> any()
Convert json from facebook favour to an easy to use format for zotonic templates.
ip_to_list(IPv6) -> any()
ip_to_long(X1::Address) -> {ok, integer()} | {error, badmatch}
Convert an IP address from a string, IPv4 tuple or IPv6 tuple to the big endian integer representation.
long_to_ip(L) -> any()
Convert long int to IP address tuple. FIXME: ipv6
to_atom(A::term()) -> atom() | undefined
Convert (almost) any value to an atom.
to_binary(A::term()) -> binary()
Convert (almost) any value to an atom.
to_binary(Tr, Context) -> any()
to_bool(V::term()) -> boolean()
Quite loose conversion of values to boolean
to_bool_strict(M::term()) -> boolean()
Convert values to boolean values according to the Django rules
to_date(D::z_dateformat:date() | binary() | string() | undefined) -> z_dateformat:date() | undefined
Convert an input to a date. Input is expected to be YYYY-MM-DD or YYYY/MM/DD.
to_datetime(DT::z_dateformat:datetime() | calendar:date() | binary() | string() | undefined) -> z_dateformat:datetime() | undefined
Convert an input to a (universal) datetime, using to_date/1 and to_time/1. If the input is a string, it is expected to be in iso 8601 format, although it can also handle timestamps without time zones. The time component of the datatime is optional.
to_flatlist(L::term()) -> string()
Flatten list and convert to string.
to_float(A::term()) -> float() | undefined
Convert (almost) any value to a float.
to_integer(A::term()) -> integer() | undefined
Convert (almost) any value to an integer.
to_isotime(DateTime::z_dateformat:datetime()) -> binary()
Convert a datetime (in universal time) to an ISO time string.
to_json(X) -> any()
Convert an Erlang structure to a format that can be serialized by mochijson.
to_list(L::term()) -> string()
Convert (almost) any value to a list.
to_localtime(D::z_dateformat:datetime() | undefined) -> z_dateformat:datetime() | undefined
Convert a utc date time to local
to_time(D::calendar:time() | binary() | string() | undefined) -> calendar:time() | undefined
Convert an input to a time. Input is expected to be HH:MM:SS or HH.MM.SS.
to_utc(D::z_dateformat:datetime() | undefined) -> z_dateformat:datetime() | undefined
Convert a local date time to utc
unicode_to_utf8(List) -> any()
Generated by EDoc