-
Notifications
You must be signed in to change notification settings - Fork 130
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
excel_numeric_to_date converts incorrectly for dates between 1900-01-01 through 1900-02-28 #478
Comments
You're right. This was fixed in #422, and it will be included in the next janitor release. If you need to use it now, you can do As an aside (see #423), excel date handling before 1900-03-01 is poor (searching the internet for "excel older dates" and similar will show many issues). |
Maybe a sign that it's time for a CRAN release 🤔
…On Fri, Apr 15, 2022, 10:51 AM Bill Denney ***@***.***> wrote:
Closed #478 <#478>.
—
Reply to this email directly, view it on GitHub
<#478 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZYDECTRXNOLIK4N6L4FXDVFF7ADANCNFSM5TPRVXOQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks! and apologies - I misread what #422 is fixing |
@aetheogamout , No worries at all. Excel dates present all sorts of unique problems. |
@sfirke, if it's CRAN release time, I'm gonna make a couple more PRs. Hopefully, I can do those later today. |
Because of the 1900-02-29 bug in how excel represents dates in windows, representation of dates from 1900-01-01 and 1900-02-28 effectively use a different origin than dates 1900-03-01 on.
The result of this is that dates produced by excel_numeric_to_date(1:59) are off by one day from the date as shown in excel:
in R:
excel_numeric_to_date(1)
[1] "1899-12-31"
in a modern version of excel convert the number 1 to a date:
=TEXT(1, "yyyy-mm-dd")
1900-01-01
The text was updated successfully, but these errors were encountered: