Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Date::Manip Sunday Holidays

by ksublondie (Friar)
on Nov 27, 2015 at 22:42 UTC ( [id://1148737]=note: print w/replies, xml ) Need Help??


in reply to Re: Date::Manip Sunday Holidays
in thread Date::Manip Sunday Holidays

https://www.frbservices.org/holidayschedules/:

"For holidays falling on Saturday, Federal Reserve Banks and Branches will be open the preceding Friday. For holidays falling on Sunday, all Federal Reserve Banks and Branches will be closed the following Monday. "

Replies are listed 'Best First'.
Re^3: Date::Manip Sunday Holidays
by u65 (Chaplain) on Nov 28, 2015 at 12:23 UTC

    Oops, my bad. Looks like a bug to me.

      In general, you probably don't want to include both the definition of New Years and New Years observed (though you can but you have to be careful of the ordering if you add both... this is talked about in the documentation on Date::Manip::Holidays).

      To define the true New Years, just add (to your holidays):

      Jan 1 = New Years

      To define an observed New Years (where you observe it on Friday Dec 31 if Jan 1 falls on Saturday, or on Mon Jan 2 if Jan 1 falls on a Sunday), use the following:

      1*1:0:1:0:0:0*DWD = New Year's Day

      NOTE: this is straight from the documentation on Date::Manip::Holidays which is a better source of information on defining holidays than the Date::Manip::Recur document.

      Other definitions are also possible, but these cover the most commonly desired definitions.

        Excellent, the solution right from the author. Thanks, SBECK!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1148737]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-24 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found