fm:DateFormat
When dealing with dates in your application, the default is usually too long, contains too much information, is ugly looking or just not what you want.
The system default is something like this: YYYY-MM-DD HH:MM:SS
The fm:DateFormat component allows you to (re)format a date returned by the system, in the same way php does.
This component cannot contain children.
Example
<fm:DateFormat date="{$media_upload}" format="d.m.Y" />
Supported attributes
| Name | Required | Default | Description |
|---|---|---|---|
| date | Required | N/A | The date to format. This attribute can accept a lot of formats, such as YYYY-MM-DD, 'now', 'tomorrow' |
| format | Required | N/A | How to format the date. This attribute accepts a similar format as PHP's date() function |
Template variables
This component has no template variables. It only outputs one thing, which is the re-formatted date.
developer documentation r17362