http://qs1969.pair.com?node_id=716119

tomazos has asked for the wisdom of the Perl Monks concerning the following question:

I would like to do some arithmetic on time, dates and timezones. Could someone recommend the best approach and modules to use?

For example:

How many days between now and Christmas?

use Foo; my $christmas = Foo->date(25, Foo->december(), Foo->today()->as_year() +); my $days_to_christmas = (Foo->today() - $christmas)->in_days();

-Andrew.


Andrew Tomazos  |  andrew@tomazos.com  |  www.tomazos.com