Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upReturn localized weekdays for wday() #401
Comments
|
Yes. It's relatively easy to implement. This applies to month as well. |
|
Where would you get the localisation databases from? I think it's better to use non-operating system sources so code works the same way across platforms. |
|
You don't need a data base. I had in mind something along the following: > enc2utf8(unique(format(lubridate:::.date_template, format = "%a@%A")))
[1] "Thu@Thursday" "Mon@Monday" "Tue@Tuesday" "Sun@Sunday" "Fri@Friday" "Wed@Wednesday" "Sat@Saturday" |
|
Oh, so the user would supply the localisation date names, not a language name? |
|
Yes. By default |
|
100 is a bit too much but a small data set of common 10-20 languages should be doable. |
|
readr has 185 ;) |
|
Thank you for the fix :) The one in Korean is good now. There is still one issue:
any idea @hadley @vspinu ? |
|
Also, AM/PM translated correctly in traditional chinese but not in Japanese and Korean. |
I guess it's because readr is using its own data base for this. |
|
I see. Thanks. Then I think let's leave it to #396 ... :) |
[Fix #401 ext] Return localized labels in month
wday() always returns English names of weekdays. I made the following changes using date_names_lang in readr, to overcome this. Is there solution exists without using readr?
Also, the same applies to month.