Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: •Day of week for an arbitary date using core modules

by meonkeys (Chaplain)
on Apr 28, 2002 at 05:51 UTC ( [id://162619]=note: print w/replies, xml ) Need Help??


in reply to Day of week for an arbitary date using core modules

Off topic, but what would you (merlyn, whomever) do if you didn't have to use core modules? Just curious what y'all prefer for date parsing and formatting. I'd do this...
#!/usr/bin/perl -Tw use strict; use Date::Format; use Date::Parse; my $time = str2time('2002-02-21'); my $day_of_wk = time2str("%w", $time); print "day of week is $day_of_wk\n"; $day_of_wk = time2str("%A", $time); print "day of week is $day_of_wk\n";
---
"A Jedi uses the Force for knowledge and defense, never for attack."

Log In?
Username:
Password:

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

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

    No recent polls found