Module z_convert

Conversion functions for all kinds of data types.

Copyright © Copyright (c) 2008-2009 Rusty Klophaus, Copyright (c) 2009 Marc Worrell

Authors: Rusty Klophaus.

Description

Conversion functions for all kinds of data types. Changes to Rusty's version: added date conversion, undefined handling and more to_bool cases.

Function Index

clean_lower/1
to_atom/1
to_binary/1
to_bool/1Quite loose conversion of values to boolean.
to_bool_strict/1Convert values to boolean values according to the Django rules.
to_date/1Convert an input to a date.
to_datetime/1Convert an input to a datetime, using to_date/1 and to_time/1.
to_float/1
to_integer/1
to_isotime/1Convert a datetime (in local time) to an ISO time string (in universal time).
to_json/1Convert an Erlang structure to a format that can be serialized by mochijson.
to_list/1
to_localtime/1Convert a utc date time to local.
to_time/1Convert an input to a time.
to_utc/1Convert a local date time to utc.

Function Details

clean_lower/1

clean_lower(L) -> any()

to_atom/1

to_atom(A) -> any()

to_binary/1

to_binary(A) -> any()

to_bool/1

to_bool(V) -> any()

Quite loose conversion of values to boolean

to_bool_strict/1

to_bool_strict(M) -> any()

Convert values to boolean values according to the Django rules

to_date/1

to_date(D) -> any()

Convert an input to a date.

to_datetime/1

to_datetime(DT) -> any()

Convert an input to a datetime, using to_date/1 and to_time/1.

to_float/1

to_float(A) -> any()

to_integer/1

to_integer(A) -> any()

to_isotime/1

to_isotime(DateTime) -> any()

Convert a datetime (in local time) to an ISO time string (in universal time).

to_json/1

to_json(X) -> any()

Convert an Erlang structure to a format that can be serialized by mochijson.

to_list/1

to_list(L) -> any()

to_localtime/1

to_localtime(D) -> any()

Convert a utc date time to local

to_time/1

to_time(D) -> any()

Convert an input to a time.

to_utc/1

to_utc(D) -> any()

Convert a local date time to utc


Generated by EDoc, Feb 25 2011, 21:14:41.