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

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

by poj (Abbot)
on Aug 22, 2014 at 19:47 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1098371]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-19 11:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found