Conversation
Codecov Report
@@ Coverage Diff @@
## master #979 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 2054 2064 +10
Branches 330 332 +2
=========================================
+ Hits 2054 2064 +10
Continue to review full report at Codecov.
|
|
|
||
| @classmethod | ||
| def excel_date( | ||
| cls, delta: Union[int, float], default_windows_date: bool = True |
There was a problem hiding this comment.
Should we change the kwarg to instead use the Microsoft terminology of 1900 and 1904 datesystem: https://docs.microsoft.com/en-us/office/troubleshoot/excel/1900-and-1904-date-system? Like make the kwarg 1904_date_system=True? Or do you think using the OS names is clearer?
There was a problem hiding this comment.
I think it makes more sense to use the 1900/1904 convention. I looked in Excel and that's what they end up of using.
| if delta < 60: | ||
| start_date = arrow.get("1899-12-31") | ||
| else: | ||
| start_date = arrow.get("1899-12-30") | ||
| else: | ||
| start_date = arrow.get("1904-01-01") |
There was a problem hiding this comment.
Instead of using arrow.get() you can call cls.get().
krisfremen
left a comment
There was a problem hiding this comment.
Would this PR be incorporating the decimal portion of the excel serial?
Yes it would. I can add test cases to make it more clear. |
|
Rather than creating a new function, I think it may be more consistent with our existing |
|
@jadchaar do you think that |
Pull Request Checklist
Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all appropriate boxes:
toxormake testto find out!).tox -e lintormake lintto find out!).masterbranch.If you have any questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!
Description of Changes
Closes: #977. New support for creation of Arrow objects from Excel Serial Dates. There seems to be an issue with the linting of the docs, after some tests have been run. Not too sure what it is at first glance.