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

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

Inheritance diagram for Elgg\I18n\DateTime:

Public Member Functions

 formatLocale (string $format, string $language=null)
 Try to format the date using locale output. More...
 

Protected Member Functions

 dateFormatToICU (string $dateFormat)
 Convert a date format to a ICU format. More...
 
 formatIntl (string $format, string $language)
 Try to format to a locale using the 'intl' PHP module. More...
 

Detailed Description

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

Since
3.0

Definition at line 12 of file DateTime.php.

Member Function Documentation

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

Convert a date format to a ICU format.

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

Definition at line 46 of file DateTime.php.

Elgg\I18n\DateTime::formatIntl ( string  $format,
string  $language 
)
protected

Try to format to a locale using the 'intl' PHP module.

Parameters
string$formatoutput format, supports date() formatting
string$languagethe output language
Returns
string|false
Since
4.1

Definition at line 82 of file DateTime.php.

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

Try to format the date using locale output.

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

Definition at line 22 of file DateTime.php.


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