in reply to Localized weekday names
Hi,
Not sure why you don't want to use library modules. I do, so I am not an expert on POSIX native functions or their Perl implementation. But I do see in the doc for POSIX::strftime:
... the results of some of the conversion specifiers are non-portable. For example, the specifiers aAbBcpZ change according to the locale settings of the user, and both how to set locales (the locale names) and what output to expect are non-standard.
Easy with DateTime (and you don't need to muck around with changing the system locale):
$ perl -MDateTime -E 'say DateTime->from_epoch(epoch => time + $_ * 86 +400, locale => "fr")->day_name for (0..6)' jeudi vendredi samedi dimanche lundi mardi mercredi
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Localized weekday names
by Sec (Monk) on Nov 03, 2017 at 15:27 UTC | |
by 1nickt (Canon) on Nov 04, 2017 at 00:08 UTC |