Abe Timmerman

NAME

lc_time - Lexical pragma for strftime.

SYNOPSIS

    {
        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());
    }

DESCRIPTION

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.

COPYRIGHT

(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:

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.