Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: WWW::Mechanize wrong month

by NetWallah (Abbot)
on Oct 31, 2012 at 06:18 UTC ( #1001605=note: print w/ replies, xml ) Need Help??


in reply to WWW::Mechanize wrong month

Perl Month numbers from 'localtime' etc are ZERO based.

This syntax:

($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = POSIX::strpti +me(string, format);
returns values similar to localtime(), which uses zero-based months.

$mday is the day of the month and $mon the month in the range 0..11, with 0 indicating January and 11 indicating December. This makes it easy to get a month name from a list:

             "By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest."           -Confucius


Comment on Re: WWW::Mechanize wrong month
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001605]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-07-04 11:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls