Re: get full month name

2007-12-10 Thread Bertolt Brecht
Thanks Chas and everyone else. The solution worked perfect Bbrecht On Dec 8, 2007 7:35 AM, Chas. Owens <[EMAIL PROTECTED]> wrote: > On Dec 7, 2007 6:10 PM, <[EMAIL PROTECTED]> wrote: > > I'm trying to write a subroutine that returns the full month name, for > > example January, or February whe

Re: get full month name

2007-12-09 Thread Gunnar Hjalmarsson
Jo for Groups and Lists wrote: Can you use Date::Manip ? $fullMonth = &returnFullmonth($month); sub returnFullmonth { use Date::Manip; return UnixDate("2007/$_/01",'%B'); } This will handle feb, 02, or 2 No, it won't handle anything. C:\home>type test.pl use warnings; $TZ

RE: get full month name

2007-12-09 Thread Jo for Groups and Lists
Can you use Date::Manip ? $fullMonth = &returnFullmonth($month); sub returnFullmonth { use Date::Manip; return UnixDate("2007/$_/01",'%B'); } This will handle feb, 02, or 2 but will not handle february itself - so you may want to check first that you are indeed passing in 1-2

Re: get full month name

2007-12-08 Thread Jefferson Kirkland
Well, to go along with the other example(s), here is a way of doing it using the localtime() function: use strict; use warnings; my ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime(); my $monthnum = $month + 1; my %monthname = (

Re: get full month name

2007-12-08 Thread Chas. Owens
On Dec 7, 2007 6:10 PM, <[EMAIL PROTECTED]> wrote: > I'm trying to write a subroutine that returns the full month name, for > example January, or February when I call the subroutine and pass a > scalar, for example $m that could have a value in one of the following > format > > 1. three letter for

Re: get full month name

2007-12-08 Thread Dr.Ruud
[EMAIL PROTECTED] schreef: > I'm trying to write a subroutine that returns the full month name, for > example January, or February when I call the subroutine and pass a > scalar, for example $m that could have a value in one of the following > format > > 1. three letter format, for example jan or

Re: get full month name

2007-12-08 Thread Eric Krause
I'm also a perl newbie, but couldn't you use a hash? Something like: %fullMonth = ( jan => January, feb => February, mar => March, etc...); print "Month: $fullMonth{$month}"; -eric [EMAIL PROTECTED] wrote: I'm trying to write a subroutine that r