Skip to content

Calculate month and quarter for timestampdiff based on date and clock time values#3409

Merged
angelamayxie merged 8 commits intomainfrom
angela/monthquarter_diff
Feb 2, 2026
Merged

Calculate month and quarter for timestampdiff based on date and clock time values#3409
angelamayxie merged 8 commits intomainfrom
angela/monthquarter_diff

Conversation

@angelamayxie
Copy link
Copy Markdown
Contributor

fixes dolthub/dolt#10393

Refactors logic for year into separate function monthDiff so that it can be reused for month and quarter

@angelamayxie angelamayxie marked this pull request as ready for review February 2, 2026 21:58
@angelamayxie angelamayxie requested a review from jycor February 2, 2026 21:58
Copy link
Copy Markdown
Contributor

@jycor jycor left a comment

Choose a reason for hiding this comment

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

LGTM, consider separating helper function.

{
// https://github.com/dolthub/dolt/issues/10397
Skip: true,
// might need to change first date to 0001-01-01 since 0000 is a leap year in Go but not in MySQL
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what a tragedy

@angelamayxie angelamayxie merged commit b3a22db into main Feb 2, 2026
8 checks passed
@angelamayxie angelamayxie deleted the angela/monthquarter_diff branch February 2, 2026 23:50
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.

TIMESTAMPDIFF calculations for month and quarter are wrong

2 participants