Skip to content

Conversation

@KhraksMamtsov
Copy link
Contributor

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

I found that when divided by a negative number, the behavior differs.
which way should this inconsistency be resolved? If it should
The same in v3 (codename bigg)

    return match(self, {
      onMillis: (millis) => {
        if (by === 0) return undefined // ===
        return make(millis / by)
      },
      onNanos: (nanos) => {
        if (by <= 0) return undefined // <=
        try {
          return make(nanos / BigInt(by))
        } catch {
          return undefined
        }
      },
      onInfinity: () => infinity
    })

Related

  • Related Issue #
  • Closes #

@nikelborm
Copy link

nikelborm commented Oct 15, 2025

codename bigg

😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants