Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Get day of week from current date

by rjt (Curate)
on Jul 09, 2013 at 00:53 UTC ( [id://1043211]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @wday = qw/Monday Tuesday Wednesday Thursday Friday Saturday Sunday
    +/;
    printf "Today is %s.\n", $wday[ (localtime(time))[6] - 1 ];
    
  2. or download this
    my @date = split(" ", localtime(time));
    my $day = $date[0]; 
    my %days = ();
    
  3. or download this
    my %days = map { substr($_,0,3) => $_ } 
        qw/Monday Tuesday Wednesday Thursday Friday Saturday Sunday/;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-25 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found