( a?: A | null, b?: B | null )
| 349 | |
| 350 | /** Returns the lesser of the two provider dates. */ |
| 351 | export function minDate<A extends DateValue, B extends DateValue>( |
| 352 | a?: A | null, |
| 353 | b?: B | null |
| 354 | ): A | B | null | undefined { |
| 355 | if (a && b) { |
| 356 | return a.compare(b) <= 0 ? a : b; |
| 357 | } |
| 358 | |
| 359 | return a || b; |
| 360 | } |
| 361 | |
| 362 | /** Returns the greater of the two provider dates. */ |
| 363 | export function maxDate<A extends DateValue, B extends DateValue>( |
no test coverage detected