DateFromString constructor
DateFromString({
- @required dynamic dateString,
- dynamic format,
- dynamic timezone,
- dynamic onError,
- dynamic onNull,
Creates $dateFromString operator expression
Converts a date/time string to a date object.
dateString- The date/time string to convert to a date object.format- Optional. The date format specification of thedateString. The format can be any expression that evaluates to a string literal, containing 0 or more format specifiers.- {timezone} - Optional. The time zone to use to format the date.
onError- Optional. If $dateFromString encounters an error while parsing the given dateString, it outputs the result value of the providedonErrorexpression. This result value can be of any type. If you do not specifyonError,$dateFromStringthrows an error if it cannot parsedateString.onNull- Optional. If thedateStringprovided to$dateFromStringisnullor missing, it outputs the result value of the providedonNullexpression. This result value can be of any type. If you do not specifyonNulland dateString is null or missing, then $dateFromString outputs null.
Implementation
DateFromString({@required dateString, format, timezone, onError, onNull})
: super(
'dateFromString',
AEObject({
'dateString': dateString,
'format': format,
'timezone': timezone,
'onError': onError,
'onNull': onNull
}));