-
Notifications
You must be signed in to change notification settings - Fork 21
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
bugfix/leap-year-lookback #46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! I also tried this out with a few other dates like 1/29 and 4/24, and all looks to be working as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! just one suggestion in the changelog
Co-authored-by: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
PR Overview
This PR will address the following Issue/Feature: Issue #45
This PR will result in the following new package version:
v0.6.2
This is adding a new case statement to logic in order to ensure users with a fiscal year end on the 29th of February do not see error messages due to the dateadd -1 logic creating a date that does not exist. Since the 29th in the previous year would not exist.
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
Bug Fixes
xero__balance_sheet
model to ensure the calculatedcurrent_year_end_date
field takes into account fiscal year ends which are occur on a leap year. To address this, if a lookback is required then the 28th of the previous year will be used to ensure an accurate date is used.Under the Hood
PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
Before marking this PR as "ready for review" the following have been applied:
Detailed Validation
Please share any and all of your validation steps:
To validate this I was able to update the seed data to include the 29th of February as the fiscal year end. I was then able to recreate the issue on the live version of the package.
Then following the application of the changes in this branch I was able to see the error be resolved.
Finally I was able to confirm that the ending date was
2023-02-28
as expected and would not result in an error on Snowflake or other warehouses due to it not being an accurate date.If you had to summarize this PR in an emoji, which would it be?
📆