date
Accepts and returnsDate instances.
Example
isoDateString
Accepts and returns ISO8601-formatted strings.Example
isoDate
Accepts ISO8601-formatted strings, returns them asDate instances.
Example
flexDate
Accepts either a Date, or an ISO date string, returns a Date instance. This is commonly useful to build decoders that can be reused to validate objects with Date instances as well as objects coming from JSON payloads.Example
Use Case
iso8601
Alias ofisoDate.
Example
dateString
Deprecated: Renamed toisoDateString. This alias will be removed in 3.x.
datelike
Deprecated: Renamed toflexDate. This alias will be removed in 3.x.
