Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: find date given day weekday and a range of months

by poj (Monsignor)
on Aug 22, 2014 at 19:47 UTC ( #1098371=note: print w/replies, xml ) Need Help??


in reply to find date given day weekday and a range of months

#!perl use strict; use Time::Piece; my $day = 28; my $weekday = 'Thu'; my $year = '2014'; my @months = ('Aug', 'Sep', 'Oct'); for my $mth (@months){ my $t = Time::Piece->strptime("$day-$mth-$year","%d-%b-%Y"); print $t->ymd."\n" if $t->wdayname eq $weekday; }
poj

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1098371]
help
Chatterbox?
[usemodperl]: question
[usemodperl]: perldoc -v 'ARGV' works but perldoc -v "STDIN' does not, but they are both filehandles. is there a perldoc for STDIN?
[usemodperl]: (typo not withstanding :)
usemodperl thinks about loose coupling...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2018-06-19 19:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (114 votes). Check out past polls.

    Notices?