FormatConverter
- Type
- Class
- Namespace
- craft\i18n
- Inherits
- craft\i18n\FormatConverter » yii\helpers\FormatConverter (opens new window) » yii\helpers\BaseFormatConverter (opens new window)
- Since
- 3.0.6
View source (opens new window)
# Public Properties
Property | Description |
---|---|
juiFallbackDatePatterns (opens new window) | array (opens new window) – The jQuery UI fallback definition to use for the ICU short patterns short , medium , long and full . |
phpFallbackDatePatterns (opens new window) | array (opens new window) – The php fallback definition to use for the ICU short patterns short , medium , long and full . |
# Public Methods
Method | Description |
---|---|
convertDateIcuToJui() (opens new window) | Converts a date format pattern from ICU format (opens new window) to jQuery UI date format (opens new window). |
convertDateIcuToPhp() (opens new window) | Converts a date format pattern from ICU format (opens new window) to PHP date() function format (opens new window). |
convertDatePhpToIcu() | Converts a date format pattern from PHP date() function format (opens new window) to ICU format (opens new window). |
convertDatePhpToJui() (opens new window) | Converts a date format pattern from PHP date() function format (opens new window) to jQuery UI date format (opens new window). |
# convertDatePhpToIcu()
Converts a date format pattern from PHP date()
function format (opens new window)
to ICU format (opens new window).
Pattern constructs that are not supported by the ICU format will be removed.
Since 2.0.13 it handles escaped characters correctly.
View source (opens new window)
Arguments
$pattern
(string (opens new window)) – Date format pattern in PHPdate()
function format.
Returns
string (opens new window) – The converted date format pattern.