in reply to Spanish dates using POSIX
It's funny that I see you, wfsp, use strftime from POSIX, where it was you who showed me on the Chatterbox a few weeks ago, that there is also a module Date::Format. And that module has multilingual support built in... but unfortunately not for Spanish. More on that later.
A problem with this module is that the docs are wrong.
Not only has the API changed, as suggested that could happen, in the docs, but there are also more languages supported than the 4 listed there: you can see the full list of supported languages in the files list in the distribution.
For example, this snippet works, for Dutch (not one of the 4 basic languages):
use Date::Format; use Date::Language; my $lang = Date::Language->new('Dutch'); local $\ = "\n"; print $lang->time2str('%A, %B %d, %Y', time, 'GMT');
So, it looks to me like you can "patch" the module to support Spanish, by adding a module file Date::Language::Spanish, similar to the other Date::Language::* modules, but with Spanish words. No files from the distribution need to be changed.
|
|---|