Feature release 1.32 of Date::Holidays Perl distribution

jonasbn

Jonas Brømsø

Posted on October 4, 2022

Feature release 1.32 of Date::Holidays Perl distribution

Due to a contribution from Wesley Schwengle (waterkip) I am happy to announce release 1.32 of the Date::Holidays Perl distribution.

The release introduces support for:

In addition the adapters for:

Have had their:

  • is_holiday
  • is_holiday_dt

Methods extended with support for additional parameters so the user can specify, the following parameters:

  • gov for handling special dates influencing government interaction
  • lang so language for holidays names can be specified

Please see the specific documentation for the 3 distributions.

I am happy that waterkip created the PR to have Date::Holidays support the use for the 3 and it outlines one of the features that would be nice to have implemented, namely support for localized holiday names (#12)

Here is a short demo of inquiring whether 2022-12-25 is a holiday in the 3 respective calendars.

#!/usr/bin/env perl

use strict;
use warnings;

use Data::Dumper;
use Date::Holidays;

my $holidays_hashref = Date::Holidays->is_holiday(
    year      => 2022,
    month     => 12,
    day       => 25,
    countries => ['nl', 'bq', 'aw'],
);

print STDERR Dumper($holidays_hashref);

exit 0;
Enter fullscreen mode Exit fullscreen mode

The output:

$VAR1 = {
          'aw' => 'Pasco di Nacemento',
          'bq' => 'Pasco di Nacemento',
          'nl' => 'Kerst'
        };
Enter fullscreen mode Exit fullscreen mode

Change log for Date::Holidays.

1.32 2022-10-03 Feature release, update not required

  • Introduction of Date::Holidays::Adapter::BQ for adapting Date::Holidays::BQ

  • Support for extra parameters for is_holiday and is_holiday_dt:

    • Date::Holidays::NL via Date::Holidays::Adapter::NL
    • Date::Holidays::AW via Date::Holidays::Adapter::AW
    • Date::Holidays::BQ via Date::Holidays::Adapter::BQ

All via PR #70 (https://github.com/jonasbn/perl-date-holidays/pull/70) by Wesley Schwengle (@waterkip) author of:

  • Date::Holidays::NL
  • Date::Holidays::AW
  • Date::Holidays::BQ

    • Fixed and clean up to Dist::Zilla configuration by @jonasbn
💖 💪 🙅 🚩
jonasbn
Jonas Brømsø

Posted on October 4, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related