* Attempts to deserialize a value to a valid date object. This is different from parsing in that * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601 * string). The default implementation does not allow any deserialization, it simply checks that * the
(value: any)
| 269 | * deserialized into a null date (e.g. the empty string), or an invalid date. |
| 270 | */ |
| 271 | deserialize(value: any): D | null { |
| 272 | if (value == null || (this.isDateInstance(value) && this.isValid(value))) { |
| 273 | return value; |
| 274 | } |
| 275 | return this.invalid(); |
| 276 | } |
| 277 | |
| 278 | /** |
| 279 | * Sets the locale used for all dates. |
nothing calls this directly
no test coverage detected