lc_time - Lexical pragma for strftime.
{ use lc_time 'nl_NL'; printf "Today in nl: %s\n", strftime("%d %b %Y", localtime()); # or on Windows use lc_time 'Russian_Russia'; printf "Today in ru: %s\n", strftime("%A %d %B %Y", localtime()); }
This pragma switches the locale LC_TIME (or LC_ALL on windows) during the strftime() call and returns a decoded() string. strftime() is exported by default.
strftime()
This is a wrapper around POSIX::strftime() that checks the hints-hash key b<pragma_LC_TIME>, and temporarily sets the locale LC_TIME to this value. This affects the '%a', '%A', '%b' and '%B' template conversion specifications.
POSIX::strftime()
(c) MMXIII - Abe Timmerman <abeltje@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See:
http://www.perl.com/perl/misc/Artistic.html
http://www.gnu.org/copyleft/gpl.html
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install lc_time, copy and paste the appropriate command in to your terminal.
cpanm
cpanm lc_time
CPAN shell
perl -MCPAN -e shell install lc_time
For more information on module installation, please visit the detailed CPAN module installation guide.