Author image Abe Timmerman


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($template, @localtime)

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.


(c) MMXIII - Abe Timmerman <>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


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.