Formats a date value by converting it from a specified input format to a new output format. This supersedes
br/formatting/DateFormatter
, which although it does provide localisation, is not completely reliable.
LocalisedDateFormatter
is typically used with Presenter, but can be invoked programmatically.
It can make use of Moment.js localized formats for input and output.
new LocalisedDateFormatter().format('20150525', {inputFormat:'YYYYMMDD' outputFormat: 'LL'})
It uses Moment.js locale configuration to format localized dates.
See
module:br/parsing/LocalisedDateParser
for the complementary parser.