(self: Duration)
| 562 | * @since 4.0.0 |
| 563 | */ |
| 564 | export const isNegative = (self: Duration): boolean => { |
| 565 | switch (self.value._tag) { |
| 566 | case "Millis": |
| 567 | return self.value.millis < 0 |
| 568 | case "Nanos": |
| 569 | return self.value.nanos < bigint0 |
| 570 | case "NegativeInfinity": |
| 571 | return true |
| 572 | case "Infinity": |
| 573 | return false |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | /** |
| 578 | * Returns `true` if the duration is positive (strictly greater than zero). |