Bank::Holidays - Perl extension for determining Federal Reserve holidays. 2013 - 2017
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";
Bank::Holidays reads a page from the Federal Reserve's website that contains holidays until 2016. 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, <firstname.lastname@example.org>
Alex White <email@example.com> - For providing a patch for 2010 changes to the fed's site.
Robert Leap <firstname.lastname@example.org> - 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.