MCPcopy Create free account
hub / github.com/angular/components / deserialize

Function deserialize

src/material/core/datetime/date-adapter.ts:271–276  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 3

isDateInstanceMethod · 0.45
isValidMethod · 0.45
invalidMethod · 0.45

Tested by

no test coverage detected