Bank::Holidays - Perl extension for determining Federal Reserve holidays. 2015 - 2019
0.82
use Bank::Holidays; # Using the date => reference you can specify any date you like. my $bank = Bank::Holidays->new( date => DateTime->now ); # or any datetime object # Check yesterday to see if it was a holiday print "Yesterday "; $bank->is_holiday( Yesterday => 1 ) ? print "is " : print "is not"; print " a holiday"; # Check to see if today is a holiday; print "Today "; $bank->is_holiday ? print "is" : print "is not"; print " a holiday\n"; # Check to see if tomorrow is a holiday. print "Tomorrow "; $bank->is_holiday( Tomorrow => 1 ) ? print "is" : print "is not"; print " a holiday\n";
As of version 0.82, no functions are exported, and EXPORTER has been removed. It's unclear if exported functions worked, as both (`is_holiday' and `reserve_holidays') required an existing Bank::Holidays object to have been created by the caller.
Bank::Holidays reads a page from the Federal Reserve's website that contains holidays until 2019. However should the FR's site change this code may not work. This code is very useful for determining days that a valid banking transaction can occur, remembering that Sunday is never a banking day.
new( [ date => dt->object ] ) Defaults to today if undefines.
is_holiday( [ Yesterday|Tomorrow => 1 ] ) To determine what day to check default is current date in date object.
Tyler Hardison, <thardison@seraph-net.net>
Alex White <wu@geekfarm.org> - For providing a patch for 2010 changes to the fed's site.
Robert Leap <robertleap@gmail.com> - For providing a patch for the 2012-2016 holday period.
Copyright (C) 2013 by Tyler Hardison
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.
To install Bank::Holidays, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bank::Holidays
CPAN shell
perl -MCPAN -e shell install Bank::Holidays
For more information on module installation, please visit the detailed CPAN module installation guide.