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

month Maggio (May) not recognized with locale it_IT #306

Closed
matteogrolla opened this issue Feb 20, 2015 · 7 comments
Closed

month Maggio (May) not recognized with locale it_IT #306

matteogrolla opened this issue Feb 20, 2015 · 7 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@matteogrolla
Copy link

ymd("1975, maggio 12")
[1] NA
Warning message:
All formats failed to parse. No formats found.

dmy("12 maggio 1975")
[1] NA
Warning message:
All formats failed to parse. No formats found.

@vspinu
Copy link
Member

vspinu commented Feb 20, 2015

What do format(ymd("1975-05-12"), "%b") and format(ymd("1975-05-12"), "%B") return?

I guess it's a capitalization issue. Does the dmy("12 Maggio 1975") work?

@matteogrolla
Copy link
Author

dmy("12 Maggio 1975")
[1] NA
Warning message:
All formats failed to parse. No formats found.

format(ymd("1975-05-12"), "%b")
[1] "Mag"

format(ymd("1975-05-12"), "%B")
[1] "Maggio"

@vspinu
Copy link
Member

vspinu commented Feb 20, 2015

That's strange. Can you parse it with strptime("1975 Maggio 12", "%Y %B %d")?

@matteogrolla
Copy link
Author

strptime("1975 Maggio 12", "%Y %B %d")
[1] "1975-05-12 CET"

@vspinu
Copy link
Member

vspinu commented Feb 20, 2015

Ok. It's our bug. I will install Italian locale and will try to reproduce and fix asap.

@vspinu vspinu added the bug an unexpected problem or unintended behavior label Feb 20, 2015
@matteogrolla
Copy link
Author

Wonderful, thanks!

@vspinu vspinu closed this as completed in cb3b6d5 Apr 23, 2015
@vspinu
Copy link
Member

vspinu commented Apr 23, 2015

It turned out that abreviated day for Sunday is "gio" which was interfering with "maggio". So lubridate was trying %y-%b%a-%d format. Should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants