PHP Класс Prado\I18N\TDateFormat
To format date and/or time for a locale (e.g. de_DE) include a Culture
attribute, for example:
The date will be formatted according to this format.
If no Pattern was specified then the date will be formatted with the
default format (both date and time). If no value for the date is specified
then the current date will be used. E.g.:
will result in the current date, formatted with default localized pattern.
Namespace: System.I18N
Properties
-
Value, date,
Gets or sets the date to format. The tag content is used as Value
if the Value property is not specified.
-
Pattern, string,
Gets or sets the formatting pattern. The predefined patterns are
'fulldate', 'longdate', 'mediumdate', 'shortdate', 'fulltime',
'longtime', 'mediumtime', and 'shorttime'. Custom patterns can specified
when the Pattern property does not match the predefined patterns.
-
DefaultText, string,
Gets or sets the default text. If Value is not set, DefaultText will be
shown instead of todays date and time.
Показать файл
Открыть проект
Защищенные свойства (Protected)
Свойство |
Тип |
Описание |
|
$formatter |
Prado\I18N\core\DateFormat |
Default DateFormat, set to the application culture. |
|
Открытые методы
Метод |
Описание |
|
getData ( ) : string |
Get the date-time value for this control. |
|
getDefaultText ( ) : string |
Get the default text value for this control. |
|
getPattern ( ) : string |
Gets the date time format pattern. |
|
getValue ( ) : string |
Get the date-time value for this control. |
|
render ( $writer ) |
|
|
setData ( $value ) |
Set the date-time value for this control. |
|
setDefaultText ( $value ) |
Set the default text value for this control. |
|
setPattern ( $value ) |
Sets the date time formatting pattern. |
|
setValue ( $value ) |
Set the date-time value for this control. |
|
Защищенные методы
Метод |
Описание |
|
getFormattedDate ( ) |
Renders the localized version of the date-time value. |
|
getPreset ( $string ) : string |
For a given string, try and find a preset pattern. |
|
Описание методов
getData()
публичный Метод
This method is required by {@link \Prado\IDataRenderer}.
It is the same as {@link getValue()}.
getDefaultText()
публичный Метод
Get the default text value for this control.
getPattern()
публичный Метод
Gets the date time format pattern.
getPreset()
защищенный Метод
For a given string, try and find a preset pattern.
getValue()
публичный Метод
Get the date-time value for this control.
setData()
публичный Метод
This method is required by {@link \Prado\IDataRenderer}.
It is the same as {@link setValue()}.
setDefaultText()
публичный Метод
Set the default text value for this control.
setPattern()
публичный Метод
Sets the date time formatting pattern.
setValue()
публичный Метод
Set the date-time value for this control.
Описание свойств