Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(datetime): .quarter calculation for difference() #3085

Merged
merged 5 commits into from
Jan 6, 2023
Merged

fix(datetime): .quarter calculation for difference() #3085

merged 5 commits into from
Jan 6, 2023

Conversation

iuioiua
Copy link
Collaborator

@iuioiua iuioiua commented Jan 2, 2023

This change fixes #3080 and simplifies some logic behind the function.

@iuioiua iuioiua marked this pull request as ready for review January 2, 2023 23:35
@iuioiua iuioiua requested a review from kt3k as a code owner January 2, 2023 23:35
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks! @iuioiua

differences.months / 4) ||
calculateMonthsDifference(bigger, smaller) / 4,
(differences.months !== undefined && differences.months / 3) ||
calculateMonthsDifference(from, to) / 3,
Copy link
Member

Choose a reason for hiding this comment

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

👍

@kt3k kt3k merged commit 483ff03 into denoland:main Jan 6, 2023
@iuioiua iuioiua deleted the fix-datetime-difference branch January 6, 2023 08:04
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.

datetime/mod.ts: difference incorrect for 'quarters'
2 participants