Solved

given a date (10/19/98) how do your determine the week day?

Posted on 1998-10-19
1
165 Views
Last Modified: 2010-03-05
What is the easiest way to determine the day of week when given only a date such as 10/19/97 ? In other words, how do I find out if 10/19/97 is a Monday, Tuesday, ect?
0
Comment
Question by:edwardk091997
1 Comment
 
LVL 5

Accepted Solution

by:
b2pi earned 50 total points
ID: 1205499
Download and install Date::Calc from www.perl.com or whereever.  Then



use Date::Calc;

$a = '10/19/97';
($m, $d, $y) = split(/\//, $a);
$dow = Date::Calc::Day_of_Week($y, $m, $d); # gives 6
$dowtext = Date::Calc::Day_of_Week_to_Text($dow); # gives 'Saturday'


0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
perl rename 2 137
collecting information 2 128
How to generate square thumbnail using perl 13 68
create a gui in perl 3 42
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now