Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jonasbn (1153)

  reversethis-{gro.napc} {ta} {nbsanoj}
AOL IM: BJonasN (Add Buddy, Send Message)

Perl Programmer located in Copenhagen, Denmark. Active member of Copenhagen Perl Mongers.

Author of:

  • Business::DK::CPR
  • Business::DK::CVR
  • Business::DK::PO
  • Business::OnlinePayment::CashCow
  • Date::Holidays
  • Date::Holidays::Abstract
  • Date::Holidays::Super
  • Date::Pregnancy
  • Games::Bingo
  • Games::Bingo::Bot
  • Games::Bingo::Print
  • Module::Info::File
  • Module::Template::Setup
  • Test::Timer

and maintainer of:

  • Tie::Tools
  • XML::Conf
  • Workflow

Journal of jonasbn (1153)

Tuesday May 25, 2004
09:04 AM


[ #18931 ]

Following a discussion in (The Copenhagen Perl Mongers IRC channel). I have added two new experimental methods to the Date::Holidays class.

The methods are:



The first one takes one argument, a DateTime object, it then validates whether this is a holiday in the calendar specified for by the country code with which the Date::Holidays object have been instantiated.

The second one acts just as the normal holidays method. It takes a single named argument, namely year. If possible it returns a reference to a hash containing all the holidays as in the scenario above, but the reference to the hash contains DateTime objects and are indexed by the holiday names.

This has not been sent to the CPAN yet and I consider it experimental since it does not as such have any priority, but it made me think that if the Date::Holidays module is going to act as wrapper for all of these things, then I guess it would be ok to implement Date::Holidays::Super as an alternative to Date::Holidays::Abstract.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.