Skip to content

Update Duration's inner representation from floating point to integers.#268

Merged
nekevss merged 9 commits into
mainfrom
update-duration-repr
May 2, 2025
Merged

Update Duration's inner representation from floating point to integers.#268
nekevss merged 9 commits into
mainfrom
update-duration-repr

Conversation

@nekevss
Copy link
Copy Markdown
Member

@nekevss nekevss commented Apr 25, 2025

This begins to address #189 and closes #250.

This completely updates the inner representation for Duration, migrating from FiniteF64s to i64. Due to the change there were also some fairly robust changes across the internals for Duration.

There were also some related updates made to some parts of rounding to bring it more in line with the specification and also calculate values without needing fractional values.

Comment thread src/builtins/core/date.rs Outdated
Copy link
Copy Markdown
Member

@jasonwilliams jasonwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nekevss
Copy link
Copy Markdown
Member Author

nekevss commented May 1, 2025

I'm not going to merge this for now. I was doing some testing locally with Boa, and there's a couple more edge cases that I need to look into.

@nekevss nekevss force-pushed the update-duration-repr branch from 63aa66e to 6f2e729 Compare May 1, 2025 04:42
@nekevss nekevss merged commit 2db9b2a into main May 2, 2025
8 checks passed
@nekevss nekevss deleted the update-duration-repr branch May 2, 2025 01:54
nekevss added a commit that referenced this pull request May 10, 2025
…s. (#268)

This begins to address #189 and closes #250.

This completely updates the inner representation for `Duration`,
migrating from `FiniteF64`s to `i64`. Due to the change there were also
some fairly robust changes across the internals for `Duration`.

There were also some related updates made to some parts of rounding to
bring it more in line with the specification and also calculate values
without needing fractional values.
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.

Bug in IsoDate::add_date_duration on max range calculations

2 participants