convertTo into sequence units should not use Euclidean division

Open
#156 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
data

Research direction

Start by locating the convertTo operation for sequence units and trace how it divides negative measurements. Reproduce the -15 inches example and compare its result with the requested (-1ft, -3in) output; done means sequence conversion uses the intended division behavior while calendar arithmetic retains Euclidean division.

Written by the indexing model from the issue text.

Description

I'm not sure if Euclidean division is correct here. We want -15 inches to be (-1ft, -3in), not (-2ft, 9in). We want Euclidean division for calendar arithmetic.

Originally posted by @sffc in https://github.com/tc39/proposal-amount/pull/141#discussion_r3787765640

Dominant language
HTML
Stars
58
Forks
12
Avg merge
2h 35m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tc39/proposal-amount

All issues in tc39/proposal-amount

Similar issues

More Data Engineering issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.