Skip to content

fix: Correct hours-to-days conversion in convertToNewDurationType#27964

Merged
romitg2 merged 3 commits intocalcom:mainfrom
AritraDey-Dev:fix/duration-math
Feb 15, 2026
Merged

fix: Correct hours-to-days conversion in convertToNewDurationType#27964
romitg2 merged 3 commits intocalcom:mainfrom
AritraDey-Dev:fix/duration-math

Conversation

@AritraDey-Dev
Copy link
Contributor

@AritraDey-Dev AritraDey-Dev commented Feb 15, 2026

What does this PR do?

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

  • Show screen recordings of the issue or feature.
  • Demonstrate how to reproduce the issue, the behavior before and after the change.

Image Demo (if applicable):

  • Add side-by-side screenshots of the original and updated change.
  • Highlight any significant change(s).

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • NA
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Summary by cubic

Fixes the hours-to-days conversion by dividing by 24 so hour inputs return correct day counts. Adds unit tests for minutes/hours/days conversions, rounding up, zero values, and exported constants.

Written for commit afa035d. Summary will update on new commits.

Signed-off-by: Aritra Dey <adey01027@gmail.com>
@github-actions github-actions bot added the 🐛 bug Something isn't working label Feb 15, 2026
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Feb 15, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Copy link
Member

@romitg2 romitg2 left a comment

Choose a reason for hiding this comment

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

LGTM

@romitg2 romitg2 added the run-ci Approve CI to run for external contributors label Feb 15, 2026
@romitg2
Copy link
Member

romitg2 commented Feb 15, 2026

@AritraDey-Dev avoid updating branch once i've added run-ci label unless something needs to be fixed.

@AritraDey-Dev
Copy link
Contributor Author

sorry about that, I wasn’t aware of that.

@romitg2 romitg2 added ready-for-e2e run-ci Approve CI to run for external contributors and removed ready-for-e2e run-ci Approve CI to run for external contributors labels Feb 15, 2026
@romitg2
Copy link
Member

romitg2 commented Feb 15, 2026

sorry about that, I wasn’t aware of that.

No worries, Thank you for your contribution!

@romitg2 romitg2 merged commit 9d4cb08 into calcom:main Feb 15, 2026
137 of 149 checks passed
@AritraDey-Dev AritraDey-Dev deleted the fix/duration-math branch February 15, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working community Created by Linear-GitHub Sync ready-for-e2e run-ci Approve CI to run for external contributors size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Incorrect logic in hours_days duration conversion

2 participants