Closed alchalu closed 4 months ago
Hi Alena!
Thank you for looking into this!
Just tried this out on a Linux environment, and unfortunately it did not work and I couldn't create a report.
It did recognise en_GB
to be a part of system('locale -a', intern = TRUE)
, however it could not find just en
as an option for the locale.
If I changed the ifelse
-statement to the following, it works without issue.
locale = ifelse('en_GB' %in% system('locale -a', intern = TRUE), 'en_GB', Sys.getlocale('LC_TIME'))
Haven't tried with a Windows environment.
Of course, another way to go about it is just to write "Report generated on 29-05-2024", or some other format than that.
The language setting only affect the name of the month, right?
thank you for trying! I guess that's the problem. For me it works on when I set local to 'en' or 'English'.
Thank you also for the suggestion of just using a different format. I am Probably just going with yyyy-mm-dd. It's not the prettiest but that's what we are using for the input data and the app so at least it's consistent.
I tried it out. Both versions yours and Jacobs work for me. And yes totally right I think going with yyyy-mm-dd is indeed a very easy solution, don't know why I did not consider this before.
I simply use Sys.Date() in the format it has now. I think that fix can be maerged.
As discussed in #242. This works now for me. There might be potential problems with other operating systems than windows. It would be great if people using Linux or macOS could try it.