-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't locate Date/Holidays/Adapter/ca_es.pm #2
Comments
Hi @eserte There is no adapter implemented for this distribution in Date::Holidays. I am planning to do so. The issue is that there is an implementation for ES in Date::Holidays::ES. As far as I can tell there is no country code for Catalonia, so an implementation like for Australia (Date::Holidays::AU) with states or New Zealand (Date::Holidays::NZ) with regions, would probably be the way to go. |
My opinion is that this issue should be closed, since the issue is with Date::Holidays and not with the Date::Holidays::CA_ES distribution. The distribution could be adjusted for easy adaptation, but due to the naming and the scope and the implementation of Date::Holidays and adaptation would be required to be implemented in Date::Holidays |
@jonasbn I think this issue may still be left open --- once Date::Holidays is fixed Date::Holidays::CA_ES could mark Date::Holidays with a minimum prereq version as a dependency to make sure that the problematic versions are upgraded. |
Hi @eserte support for Date::Holidays::CA_ES has been added with release 1.13.
The module is not supported directly, but as described earlier it is identified as a region ('CA') in Spain ('ES'). Example: use Date::Holidays;
my $dh = Date::Holidays->new( countrycode => 'es' );
if ($dh->is_holiday(year => 2017, month => 6, day => 24, region => 'ca')) {
print "Yes it is a Catalan holiday\n";
}
my $holidays = $dh->holidays( year => 2006, region => 'ca' ); If you do want to view Catalonia as a region in Spain, you can use it directly: use Date::Holidays;
my $dh = Date::Holidays->new( countrycode => 'CA_ES', nocheck => 1 );
if ($dh->is_holiday(year => 2017, month => 6, day => 24)) {
print "Yes it is a Catalan holiday\n";
}
my $holidays = $dh->holidays( year => 2006); I plan to discontinue the |
This is in relation to: miquelruiz/Date-Holidays-CA_ES#2
Re-enabled tests in 5d28195 |
The test suite started to fail:
Maybe this happens with newer Date::Holidays (@jonasbn: FYI).
The text was updated successfully, but these errors were encountered: