Item Description: Keeping current the Acme Way
jeffa steps up to the podium
[feedback] testing ... is this thing on? ahem. Manipulating dates in Perl is a common task, and it's no wonder that there are a plethora of date modules in the Date namespace. As you can see in the following Power Point slide [show slide that makes the Bioperl Class Diagram look easy], determining which Date module to use is quite a chore. All of that just to find a date. Enter Acme::Current.Acme::Current seeks to [feedback] (can that be fixed?) ... anyhoo, it seeks to eliminate the complexity associated with determining the current date. I installed the module on my box yesterday, let's test it out:
And when run, this yields:use Acme::Current; printf "It's now %04d/%02d/%02d.\n", $Acme::Current::YEAR, $Acme::Current::MONTH, $Acme::Current::DAY ;
It's now 2003/07/15.Uh oh. Today is the 16th (is today the 16th?). Yes it appears to be the 16th. [shuffles notes] Ummmm. help. [shuffles notes ... feedback]. Aha! I forgot to update the module today! [installs module again].
There, let's run that code again:
and we get the current date:use Acme::Current; printf "It's now %04d/%02d/%02d.\n", $Acme::Current::YEAR, $Acme::Current::MONTH, $Acme::Current::DAY ;
It's now 2003/07/16.In conclusion, as long as you keep Acme::Current up to date (a scheduled cron job should do the trick), Acme::Current will keep you up to date with the current date ... as long as you don't mind that date being GMT, or course. Thank you.
|Replies are listed 'Best First'.|
by educated_foo (Vicar) on Jul 19, 2003 at 17:12 UTC
by tsee (Curate) on Aug 30, 2003 at 10:06 UTC