Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Get day of week from current date

by Cristoforo (Curate)
on Jul 08, 2013 at 19:42 UTC ( [id://1043170]=note: print w/replies, xml ) Need Help??


in reply to Get day of week from current date

A solution using Date::Simple.
#!/usr/bin/perl use strict; use warnings; use 5.014; use Date::Simple qw/ date today /; my $dow = date('2002-02-21'); say $dow->day_of_week, ' ', $dow->strftime("%A"); $dow = today; say $dow->day_of_week, ' ', $dow->strftime("%A");
Prints
4 Thursday 1 Monday

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found