## P4A_I18N_Datetime

Description

p4a internationalization class for date/time.

- author: Fabrizio Balliano <fabrizio.balliano@crealabs.it>
- author: Andrea Giardina <andrea.giardina@crealabs.it>

Located in /p4a/i18n/i18n_datetime.php (line 46)

Variable Summary
array $formats
array $locale_vars
Method Summary
P4A_I18N_Datetime P4A_I18N_Datetime (array &$formats, mixed &$locale_vars)
string format ([string $date = NULL], [array $format = P4A_DATETIME])
string formatDateDefault ([string $date = NULL])
string formatDateFull ([string $date = NULL])
string formatDateLong ([string $date = NULL])
string formatDateMedium ([string $date = NULL])
string formatTimeDefault ([string $time = NULL])
string formatTimeShort ([string $time = NULL])
array getFormat (string $format)
void setFormat (string $format, [array $value = P4A_DATETIME])
string unformat (string $date, array $format, [array $output_format = P4A_DATETIME])
string unformatDate (string $date, array $format)
string unformatDateDefault (string $date)
string unformatDateFull (string $date)
string unformatDateLong (string $date)
string unformatDateMedium (string $date)
string unformatTimeDefault ([string $time = NULL])
string unformatTimeShort ([string $time = NULL])
Variables
array $formats = NULL (line 53)

Here we store all formats.

- access: private

array $locale_vars = NULL (line 60)

Here we store all formats.

- access: private

Methods
Constructor P4A_I18N_Datetime (line 67)

Class constructor.

- access: private

P4A_I18N_Datetime P4A_I18N_Datetime (array &$formats, mixed &$locale_vars)

- array &$formats: All formats in array.

format (line 80)

Format a date using a format.

- access: public

string format ([string $date = NULL], [array $format = P4A_DATETIME])

- string $date: The date in YYYY-MM-DD HH:MM:SS
- array $format: The format (see set_format)

formatDateDefault (line 91)

Format a date using the default format.

- access: public

string formatDateDefault ([string $date = NULL])

- string $date: The date in YYYY-MM-DD HH:MM:SS

formatDateFull (line 124)

Format a date using the "full" format.

- access: public

string formatDateFull ([string $date = NULL])

- string $date: The date in YYYY-MM-DD HH:MM:SS

formatDateLong (line 113)

Format a date using the "long" format.

- access: public

string formatDateLong ([string $date = NULL])

- string $date: The date in YYYY-MM-DD HH:MM:SS

formatDateMedium (line 102)

Format a date using the "medium" format.

- access: public

string formatDateMedium ([string $date = NULL])

- string $date: The date in YYYY-MM-DD HH:MM:SS

formatTimeDefault (line 216)

Format a time with in the default time format.

- access: public

string formatTimeDefault ([string $time = NULL])

- string $time: The time in HH:MM:SS format

formatTimeShort (line 231)

Format a time in the "short" time format.

- access: public

string formatTimeShort ([string $time = NULL])

- string $time: The time in HH:MM:SS format

getFormat (line 268)

Returns a format identified by a name.

- access: public

array getFormat (string $format)

- string $format: The format name.

setFormat (line 280)

Sets a format.

Format is like this: array('% Eur', '2', ',', '.').

- access: public

void setFormat (string $format, [array $value = P4A_DATETIME])

- string $format: The format name
- array $value: The format

unformat (line 139)

Unformat a date formatted with a format.

After unformatting, returns the date formatting it with $output_format.

- see: set_format()
- access: public

string unformat (string $date, array $format, [array $output_format = P4A_DATETIME])

- string $date: The date
- array $format: The input format(see set_format)
- array $output_format: The output format(see set_format)

unformatDate (line 153)

Unformat a date formatted with a format.

Returns a date formatted with the P4A_DATE date format.

- see: set_format()
- access: public

string unformatDate (string $date, array $format)

- string $date: The date
- array $format: The input format(see set_format)

unformatDateDefault (line 166)

Unformat a date formatted with a format.

Assumes that data is formatted with the default date format. Returns a date formatted with the P4A_DATE date format.

- access: public

string unformatDateDefault (string $date)

- string $date: The date

unformatDateFull (line 205)

Unformat a date formatted with a format.

Assumes that data is formatted with the "full" date format. Returns a date formatted with the P4A_DATE date format.

- access: public

string unformatDateFull (string $date)

- string $date: The date

unformatDateLong (line 192)

Unformat a date formatted with a format.

Assumes that data is formatted with the "long" date format. Returns a date formatted with the P4A_DATE date format.

- access: public

string unformatDateLong (string $date)

- string $date: The date

unformatDateMedium (line 179)

Unformat a date formatted with a format.

Assumes that data is formatted with the "medium" date format. Returns a date formatted with the P4A_DATE date format.

- access: public

string unformatDateMedium (string $date)

- string $date: The date

unformatTimeDefault (line 246)

Unformat a formatted time (in default format) and returns it formatted in P4A_TIME format.

- access: public

string unformatTimeDefault ([string $time = NULL])

- string $time: The time

unformatTimeShort (line 257)

Unformat a formatted time (in "short" format) and returns it formatted in P4A_TIME format.

- access: public

string unformatTimeShort ([string $time = NULL])

- string $time: The time

Documentation generated on Fri, 26 May 2006 12:43:16 +0200 by phpDocumentor 1.3.0RC5