Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: List of days in current month

by Anonymous Monk
on Mar 13, 2014 at 19:33 UTC ( [id://1078233]=note: print w/replies, xml ) Need Help??


in reply to Re: List of days in current month
in thread List of days in current month

Thanks, that pointed me to the right direction:
#!/usr/bin/env perl use strict; use warnings; use Time::Piece qw(); my $t = Time::Piece->new(); my $month = $t->mon; my $year = $t->year; my $lday = $t->month_last_day; my @dates = map sprintf( "%02d/%02d/%04d", $month, $_, $year ), 1 .. $ +lday; foreach my $date(@dates) { print $date."\n"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2024-04-23 10:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found