Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 musing on the Monastery: (2)
As of 2015-07-06 04:55 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 (70 votes), past polls