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

test: Fix unknown date functions #60

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

stepansergeevitch
Copy link
Collaborator

Implemented missing year, week and second date functions

@stepansergeevitch stepansergeevitch self-assigned this Aug 7, 2024
@stepansergeevitch stepansergeevitch requested a review from a team as a code owner August 7, 2024 10:47
Copy link
Collaborator

@ptiurin ptiurin left a comment

Choose a reason for hiding this comment

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

Same q as in the other PR on week offset calculation, but apart from that LGTM

@stepansergeevitch
Copy link
Collaborator Author

Same q as in the other PR on week offset calculation, but apart from that LGTM

This offset is used to make sure we account for the start-of-week setting. Basically, if you try to get the day-of-week for a particular date, then depending on the start of the week setting you'll get a different result. Like say you have some date which is Thursday, and if start-of-week is monday you'll get 4. Yet if start-of-week is Wednesday, you'll get 2. That's why we need to substract this offset. And it's value is weird, like for Monday it's 0, for Tuesday 6, Wednesday 5 and so on. That's why the math

@stepansergeevitch stepansergeevitch merged commit f1462bb into develop Aug 12, 2024
2 checks passed
@stepansergeevitch stepansergeevitch deleted the FIR-35118-unknown-date-functions branch August 12, 2024 13:13
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.

2 participants