Constructor
new module:br/formatting/DateFormatter()
- Implements:
- Deprecated:
- The functionality provided by this formatter can be achieved more reliably with
module:br/formatting/LocalisedDateFormatter
- The functionality provided by this formatter can be achieved more reliably with
- Source:
Methods
-
format(vValue, mAttributes)
-
Formats a date by converting it from a specified input format to a new output format.
Parameters:
Name Type Description vValuestring | Date the input date mAttributesobject the map of attributes. Properties
Name Type Attributes Default Description inputFormatstring <optional>
'DD-MM-YYYY HH:mm:ss' format of the input date, expressed with Moment.js format tokens outputFormatstring <optional>
'DD-MM-YYYY HH:mm:ss' format of the output date, expressed with Moment.js format tokens adjustForTimezoneboolean <optional>
false whether the formatter should adjust the date according to the client's timezone - Implements:
- Source:
Returns:
the output date.