e splitpath updir );
use JSON qw(decode_json);
use List::MoreUtils qw( uniq );
use LWP::Simple qw( get );
use Time::Local ();
my $URL = 'https://www.gov.uk/bank-holidays.json';
my %CODE = (
'eng
get_dates( download_json() ) );
exit;
sub file {
return catfile( ( splitpath( realpath __FILE__ ) )[ 0, 1 ],
updir, qw(lib Date Holidays GB.pm) );
}
sub download_json {
my $content
s = get $URL or die "Can't download $URL";
return decode_json($contents);
}
sub get_dates {
my $data = shift;
my %holiday;
foreach my $region ( keys %{$data} ) {
foreach m