Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Months of the year

by kennethk (Abbot)
on Mar 31, 2014 at 19:02 UTC ( #1080431=note: print w/replies, xml ) Need Help??

in reply to Months of the year

The line from the docs
Means that if you want to change the months list (for perhaps localization or internationalization), this is the API. If you just call the method with no arguments, you get the list of months:
my @months = Time::Piece::mon_list;
my $t = Time::Piece->new(); my @months = $t->mon_list;

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Replies are listed 'Best First'.
Re^2: Months of the year
by Anonymous Monk on Mar 31, 2014 at 19:14 UTC
    Thats a lot less code, now is trying to get the full name of the months with:
    my @months = $t->fullmonth;
    Not that easy I guess. It only gives the full name of the current month.
      use Time::Piece; use feature 'say'; my $t = Time::Piece->strptime('1', '%m'); for ( 0..11 ) { say $t->add_months($_)->fullmonth }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1080431]
[robby_dobby]: page for yapceu is out of date by 2 years
[robby_dobby]: LanX: Sharm-el-Sheikh is in Egypt
[robby_dobby]: Thanks, choroba
[LanX]: yes and Egypt (like Turkey and Russia) belongs to two continents
[choroba]: Also Europe and Asia are geographically one continent, the division is political
[robby_dobby]: I always thought everything on the other side of Suez to be Africa. That's an entire continent
[LanX]: Sinai_Peninsula
[robby_dobby]: choroba: If you're talking of Eurasia, it's only true of the erstwhile Constantinople/ Ottoman empire
[LanX]: yes correct, but Sinai is not on the other side

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (15)
As of 2017-04-24 16:05 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (442 votes). Check out past polls.