Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by poj (Priest)
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


Comment on Re: find date given day weekday and a range of months
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-11-28 07:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (193 votes), past polls