* Checks if two dates are equal. * @param first The first date to check. * @param second The second date to check. * @returns Whether the two dates are equal. * Null dates are considered equal to other null dates.
(first: D | null, second: D | null)
| 322 | * Null dates are considered equal to other null dates. |
| 323 | */ |
| 324 | sameDate(first: D | null, second: D | null): boolean { |
| 325 | if (first && second) { |
| 326 | let firstValid = this.isValid(first); |
| 327 | let secondValid = this.isValid(second); |
| 328 | if (firstValid && secondValid) { |
| 329 | return !this.compareDate(first, second); |
| 330 | } |
| 331 | return firstValid == secondValid; |
| 332 | } |
| 333 | return first == second; |
| 334 | } |
| 335 | |
| 336 | /** |
| 337 | * Checks if the times of two dates are equal. |
nothing calls this directly
no test coverage detected