* Get a component property of this date.
(property: string)
| 139 | * Get a component property of this date. |
| 140 | */ |
| 141 | public get(property: string): unknown { |
| 142 | switch (property) { |
| 143 | case "year": |
| 144 | return this.year; |
| 145 | case "month": |
| 146 | return this.month; |
| 147 | case "day": |
| 148 | return this.day; |
| 149 | case "week": |
| 150 | return this.week; |
| 151 | case "dayOfWeek": |
| 152 | return this.dayOfWeek; |
| 153 | case "quarter": |
| 154 | return this.quarter; |
| 155 | case "ordinalDay": |
| 156 | return this.ordinalDay; |
| 157 | default: |
| 158 | return null; |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | * Convert to ISO string (YYYY-MM-DD). |
nothing calls this directly
no outgoing calls
no test coverage detected