At 11:19 AM -0800 5/4/03, [EMAIL PROTECTED] wrote:
for perl is there a simple way to get the current week of the year?
something like 5/52 or anything like that.

use DateTime; $week_of_year = DateTime->new(year=>2003, month=>04, day=>06)->week_number;

or, if your date is already a datetime object:
$week_of_year = $dt_object->week_number;

thirdly, if you want the current week of the year:
$week_of_year = DateTime->now()->week_number;

Cheers!
Rick

--
--------------------------------------------------------
            There are 10 kinds of people:
  those that understand binary, and those that don't.
--------------------------------------------------------
  The day Microsoft makes something that doesn't suck
    is the day they start selling vacuum cleaners
--------------------------------------------------------
"Write a wise proverb and your name will live forever."
   -- Anonymous
--------------------------------------------------------

Reply via email to