* Compares the time values of two dates. * @param first First date to compare. * @param second Second date to compare. * @returns 0 if the times are equal, a number less than 0 if the first time is earlier, * a number greater than 0 if the first time is later.
(first: D, second: D)
| 307 | * a number greater than 0 if the first time is later. |
| 308 | */ |
| 309 | compareTime(first: D, second: D): number { |
| 310 | return ( |
| 311 | this.getHours(first) - this.getHours(second) || |
| 312 | this.getMinutes(first) - this.getMinutes(second) || |
| 313 | this.getSeconds(first) - this.getSeconds(second) |
| 314 | ); |
| 315 | } |
| 316 | |
| 317 | /** |
| 318 | * Checks if two dates are equal. |
nothing calls this directly
no test coverage detected