Author image collin seaton
and 1 contributors

NAME

Bank::Holidays - Determine Federal Reserve holidays, 2017 - 2021

VERSION

0.86

SYNOPSIS

  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";

EXPORTER

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.

DESCRIPTION

Bank::Holidays reads a page from the Federal Reserve's website that contains holidays until 2021. 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.

methods

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.

AUTHOR

Tyler Hardison, <thardison@seraph-net.net>

THANKS TO

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 AND LICENSE

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.