Re: Find first day of every week in a month
- From: rcook@xxxxxxxxxxx (Owen Cook)
- Date: Mon, 29 Aug 2005 20:56:34 +1000 (EST)
On Mon, 29 Aug 2005, Anil Kumar, Malyala wrote:
>
> I am new to perl and working for a small project...
>
> I need some help from you..
>
> How to get all the first days of a week in a month.
There is a module Date::Calc and from that
Day_of_Week
$dow = Day_of_Week($year,$month,$day);
Here is a little program for you.
---------------------------------------------
#!/usr/bin/perl
use Date::Calc qw(Day_of_Week);
use strict;
my $dow = Day_of_Week(2005,9,1);
print "$dow\n";
--------------------------------------------
The answer is 4. So now make an array or hash to convert the 4 to Thursday
Owen
.
- References:
- Find first day of every week in a month
- From: Anil Kumar
- Find first day of every week in a month
- Prev by Date: Re: Find first day of every week in a month
- Next by Date: system ("cd ..")
- Previous by thread: Re: Find first day of every week in a month
- Next by thread: Re: Find first day of every week in a month
- Index(es):
Relevant Pages
|
|