[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Omaha.pm] Fwd: Calculate next meeting date
:)
j
-------- Original Message --------
Subject: Re: [pm_groups] Calculate next meeting date
Date: Wed, 03 May 2006 13:51:16 +1200
From: Grant McLean (Wellington.PM) <perlmongers@catalyst.net.nz>
On Tue, 2006-05-02 at 20:10 -0500, Jay Hannah wrote:
This is a pretty slick combination of Date::Calc and Class::Date, IMHO:
http://omaha.pm.org/nextmtg_pl.txt
(In action: http://omaha.pm.org)
Anyone have a tighter version? :)
How about:
use Date::Manip;
my $next_month =
UnixDate(DateCalc(ParseDate("1st"), "+ 1 month"), "%b %Y");
print ParseDate("2nd Tuesday of $next_month")
One part of the Date::Manip POD seemed to suggest that ParseDate() would
directly understand a string like "2nd Tuesday of next month", but I
couldn't get that to work.
Regards
Grant