Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WeekFunction calculates long years incorrectly (#10599)
Summary: Pull Request resolved: #10599 The WeekFunction treats leap years that end on Saturday, and any year that ends on Friday or Thursday as a year with 53 weeks. However, according to Wikipedia https://en.wikipedia.org/wiki/ISO_week_date#Weeks_per_year years with 53 weeks are leap years that end on Friday and any year that ends on Thursday. I updated the logic to reflect this. I added tests to cover cases where we end up in Week 0, which is the only case where this logic is used, and verified the results match Presto Java. Reviewed By: amitkdutta Differential Revision: D60427017 fbshipit-source-id: 22781fdfe04c31969dd1d30bc4d618ce7cb0ad03
- Loading branch information