(self: Duration)
| 498 | * @since 4.0.0 |
| 499 | */ |
| 500 | export const isNegative = (self: Duration): boolean => { |
| 501 | switch (self.value._tag) { |
| 502 | case "Millis": |
| 503 | return self.value.millis < 0 |
| 504 | case "Nanos": |
| 505 | return self.value.nanos < bigint0 |
| 506 | case "NegativeInfinity": |
| 507 | return true |
| 508 | case "Infinity": |
| 509 | return false |
| 510 | } |
| 511 | } |
| 512 | |
| 513 | /** |
| 514 | * Returns `true` if the duration is positive (strictly greater than zero). |