Constructor
new module:br/presenter/parser/DateParser()
- Implements:
Methods
-
parse(vValue, mAttributes)
-
Matches a date string and converts it to a specified output format. In order to match the date, either a list of explicit
inputFormats
can be supplied, or anamerican
indicator can be used against a set of standard formats, which are as follows: American: m-d-Y, m-d-y, M-d-Y, M-d-y, m-d
European: d-m-Y, d-m-Y, d-M-Y, d-M-Y, d-m
Attribute Options:
Option Description american if true, dates are assumed to be in American format, i.e. month before date (defaults to false) separators a set of admissible separator characters (defaults to "/.-") inputFormats a comma separated list of admissible input formats outputFormat the output date format Parameters:
Name Type Description vValue
Variant the date to parse (String). mAttributes
Map the map of attributes. - Implements:
Returns:
the date, expressed in the output format