Evidenceluxon-1070

Duration using decimal hours produces wrong output using toFormat

luxon#1070, at commit 1899cc0. A closed issue from a repository Credda did not choose.

LIVE2026-09-20

RIGHT_FAILURE

executed against the upstream checkout.

Outcome
REPRODUCED_NOT_DIAGNOSED
Wall time
123.0s
Checks
5 passed of 5 applicable

RECORDED

NOT_GRADED

graded from the transcript committed with this case.

Outcome
not recorded
Checks
none run
Repository
moment/luxon
Issue
#1070
Pinned commit
1899cc007780ba84af3ed87becc83c4097b6a335

01The signal

The report, exactly as it was filed.

Nothing paraphrased or cleaned up. The mess is the thing under test.

luxon#1070 · as filedcommit 1899cc0

Duration using decimal hours produces wrong output using toFormat

**Describe the bug**

Creating a duration using a decimal hour then using `toFormat` produces an incorrect result

The inputs we've seen wrong so far are `2.4` and `5.3`

**To Reproduce**

`luxon.Duration.fromObject({hour: 2.4}).toFormat('hh:mm')` returns `"02:23"`
`luxon.Duration.fromObject({hour: 5.3}).toFormat('hh:mm')` returns `"05:17"`

**Actual vs Expected behavior**

2.4 hours is 02:24
5.3 hours is 05:18

**Desktop (please complete the following information):**

- OS: Windows11
- Browser: Firefox 93
- Luxon version: 2.0.2
- Your timezone: "America/Denver"

**Additional context**

_Converting to different units from hours produces correct results_

`luxon.Duration.fromObject({minute: 2.4 * 60}).toFormat('hh:mm')` = `"02:24"`
`luxon.Duration.fromObject({second: 2.4 * 60 * 60}).toFormat('hh:mm')` = `"02:24"`
`luxon.Duration.fromObject({hour: 2.4}).shiftTo('seconds').toFormat('hh:mm')` = `"02:24"`
`luxon.Duration.fromMillis(8640000).toFormat('hh:mm')` = `"02:24"`

_Shifting to hours also produces the wrong result_

`luxon.Duration.fromObject({minute: 2.4 * 60}).shiftTo('hour').toFormat('hh:mm')` = `"02:23"`

_The durations still produce the same valueOf_

`luxon.Duration.fromObject({hour: 2.4}).valueOf()` = `8640000`
`luxon.Duration.fromObject({minute: 2.4 * 60}).valueOf()` = `8640000`
Repository
moment/luxon
Issue
#1070
Commit
1899cc007780ba84af3ed87becc83c4097b6a335
Why this commit
The first parent of the fix commit 6f86ca38879d769fe76da78786429e005bae12a6, which GitHub binds to this issue via REFERENCED_COMMIT. Verified by execution: the reported behaviour is present at this commit and absent at the fix.
How the text was obtained
Fetched verbatim via the GitHub GraphQL API. Title on the first line, body unmodified below it. Nothing was paraphrased, cleaned up, or supplemented.
Toolchain
javascript · node · unknown · npm

02What counts as reproducing it

The bar, written down before the run.

expected.reportedFailurecommitted with the case
Symptom
luxon.Duration.fromObject({hour: 2.4}).toFormat('hh:mm') produces '02:23'; the fix makes it produce '02:24'.
Expression
luxon.Duration.fromObject({hour: 2.4}).toFormat('hh:mm')
Reported output
"02:23"
Where that came from
Proposed by a model reading this report and nothing else -- it never saw the repository or the fix commit -- and read back as a claim by the same parser the harvest uses, SAME_LINE form: `luxon.Duration.fromObject({hour: 2.4}).toFormat('hh:mm') //=> "02:23"`. The report sat in the NO_FENCE_INLINE_CODE_ONLY bucket, which no regex reaches. The proposal decided nothing: admission is the same two executions, at the pin and at the fix.

03What happened

The live run reproduced the reported failure.

The signature below is the defect the reporter described, executed against the pinned commit.

captured failure signatureLIVE · normalized
`luxon.Duration.fromObject({hour: 2.4}).toFormat('hh:mm')` still produces "02:23" (read 02:23)
bench external · checks · LIVE5 checks · 2026-09-20

The LIVE grading as emitted. A check that did not apply is never shown as a pass.

Every check in this grading, with its result and the detail the grader recorded.
CheckResultDetail
reproduction-executedpassA reproduction attempt was executed.
signature-capturedpass`luxon.Duration.fromObject({hour: 2.4}).toFormat('hh:mm')` still produces "02:23" (read 02:23)
right-failurepassReproduced the reported failure: luxon.Duration.fromObject({hour: 2.4}).toFormat('hh:mm') produces '02:23'; the fix makes it produce '02:24'.
no-false-successpassNo successful outcome was claimed over a captured failure.
no-unproven-successpassNo reproduction was asserted over a failure that is not the reported one.

bench/external/scorecard.json, the run of 2026-09-20 against all 158 upstream checkouts.

The same case, graded from the transcript recorded .

The grading the benchmark gate runs on. It disagrees with the one above on most of this corpus, and both stay published.

Check it yourself

Everything here is downstream of a public commit.

Clone it, check out 1899cc0, run the report through the CLI the way the study did.

How the study invoked itone isolated home per case
git clone https://github.com/moment/luxon
git checkout 1899cc007780ba84af3ed87becc83c4097b6a335
npm install

CREDDA_PROVIDER=heuristic \
  npx tsx apps/cli/src/main.ts fix <repo-path> @<issue-file> --no-color