I didn't realize until investigating this thread that the scalar return of localtime is a built-in and is not locale dependent. I figured it was like UNIX ctime so I cringed at some of the scalar solutions since I thought they'd break if the default time locale setting changed. But I was wrong.
Before realizing this, my first choice would have been to use the POSIX strftime method as proposed by Abigail-II. Another way is this:$mon = (qw/jan feb mar apr may jun jul aug sep oct nov dec/)[(localtim +e)[4]]; print "$mon\n";
In reply to Re: Localtime
by steves
in thread How to get 3-letter month abbreviations ?
by powerhouse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |