* Create a DateValue from a map of components.
(map: Record<string, unknown>)
| 70 | * Create a DateValue from a map of components. |
| 71 | */ |
| 72 | public static fromMap(map: Record<string, unknown>): DateValue | null { |
| 73 | const year = map.year; |
| 74 | const month = map.month; |
| 75 | const day = map.day; |
| 76 | if (typeof year !== "number" || typeof month !== "number" || typeof day !== "number") { |
| 77 | return null; |
| 78 | } |
| 79 | return new DateValue(year, month, day); |
| 80 | } |
| 81 | |
| 82 | public get year(): number { |
| 83 | return this.#year; |
no outgoing calls
no test coverage detected