in reply to Re^5: Date::Manip Sunday Holidays
in thread Date::Manip Sunday Holidays
Unfortunately, it appears that I didn't get the right answer. Going back and rereading it (more carefully this time around), the desired date of New Years is:
1/1 if 1/1 is Mon-Fri OR Sat 1/2 if 1/1 is Sun
That's much more complicated. I found something that I thought would work...
1*1:0:1:0:0:0*NBD,BD1,IBD,FD1 = New Year's Day (Saturday) 1*1:0:1:0:0:0*NBD,BD1,NBD,FD2 = New Year's Day (Sunday observed Mon +day) 1*1:0:1:0:0:0*IBD = New Year's Day (real)
but it is failing on some years. I actually think it might be a bug. I'll check into it tomorrow.
I have definitely decided that I need to add a couple more modifiers similar to IBD and NBD which will check if it is a given day of the week. That would make this much simpler. I hadn't been aware of the complexity of the holiday definition used here.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Date::Manip Sunday Holidays
by SBECK (Chaplain) on Dec 01, 2015 at 03:20 UTC | |
|
Re^7: Date::Manip Sunday Holidays
by SBECK (Chaplain) on Dec 01, 2015 at 17:40 UTC | |
by ksublondie (Friar) on Dec 01, 2015 at 20:05 UTC | |
by SBECK (Chaplain) on Dec 01, 2015 at 20:54 UTC | |
by ksublondie (Friar) on Dec 01, 2015 at 19:08 UTC | |
by ksublondie (Friar) on Dec 02, 2015 at 19:19 UTC | |
by SBECK (Chaplain) on Dec 03, 2015 at 17:58 UTC |