* Compare two dates for sorting. * Returns negative if this < other, positive if this > other, 0 if equal.
(other: DateValue)
| 174 | * Returns negative if this < other, positive if this > other, 0 if equal. |
| 175 | */ |
| 176 | public compareTo(other: DateValue): number { |
| 177 | if (this.#year !== other.#year) return this.#year - other.#year; |
| 178 | if (this.#month !== other.#month) return this.#month - other.#month; |
| 179 | return this.#day - other.#day; |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | /** |