Elgg  Version 3.0
Public Member Functions | Protected Member Functions | List of all members
Elgg\I18n\DateTime Class Reference

Extension of the DateTime class to support formating a date using the locale. More...

Inheritance diagram for Elgg\I18n\DateTime:

Public Member Functions

 formatLocale (string $format, string $language=null)
 Format the date using strftime() which supports locale output. More...
 

Protected Member Functions

 dateFormatToStrftime (string $dateFormat)
 Convert a date format to a strftime format. More...
 

Detailed Description

Extension of the DateTime class to support formating a date using the locale.

Since
3.0

Definition at line 12 of file DateTime.php.

Member Function Documentation

Elgg\I18n\DateTime::dateFormatToStrftime ( string  $dateFormat)
protected

Convert a date format to a strftime format.

Timezone conversion is done for unix. Windows users must exchange z and Z.

Unsupported date formats : n, t, L, B, u, e, I, P, Z, c, r Unsupported strftime formats : U, W, C, g, r, R, T, X, c, D, F, x

Parameters
string$dateFormata date format
Returns
false|string
See also
https://secure.php.net/manual/en/function.strftime.php#96424

Definition at line 26 of file DateTime.php.

Elgg\I18n\DateTime::formatLocale ( string  $format,
string  $language = null 
)

Format the date using strftime() which supports locale output.

Parameters
string$formatoutput format, supports date() formatting
string$languagethe output language, defaults to current language
Returns
string

Definition at line 66 of file DateTime.php.


The documentation for this class was generated from the following file: