getParsingPipeline();
Returns parsing pipeline.
Array.<String> |
getDefaultModelFormat();
Returns default model format.
String |
parse(parsingDate, [customModelFormatProvider], [customViewFormatProvider]);
Function tries to parse date using formats pipeline and if no format matches, it tries to use customViewFormatProvider
if it is specified.\
Then parse date and returns it formatted using customModelFormatProvider
or if it is not specified, defaultModelFormat
.
If no model format specified it returns ISO format.
If no format matches, it returns null
.
Param | Type | Details |
---|---|---|
parsingDate | String | |
customModelFormatProvider
(optional)
|
String | |
customViewFormatProvider
(optional)
|
String |
String | Parsed date in ISO / customModelFormatProvider / defaultModelFormat. |
format(formattingDate, [customModelFormatProvider], [customViewFormatProvider]);
Function tries to parse date using customModelFormatProvider
or if it is not specified, defaultModelFormat
.
If no format specified, ISO format is used.
Then it is formatted with customViewFormatProvider
or ISO is used.
If parsing is unsuccessful, it returns null
.
Param | Type | Details |
---|---|---|
formattingDate | String | |
customModelFormatProvider
(optional)
|
String | |
customViewFormatProvider
(optional)
|
String |
String | Formatted date in ISO / customViewFormatProvider. |