Comments (10)
Hi @samstickland! Thanks for being SO. PATIENT. with me as I worked through the other refactors. The fix in the end was pretty simple thanks to the work done by @ttwo32 and the refactoring for the internal workings for handling date modifying functions.
If you would be so kind please take a quick look at the PR (#189) and make sure that my tests make sense. If you're happy with it then I'll go ahead and merge it and get it out the door as a minor point release.
Thanks again!
from holidays.
Hi again @samstickland.
Yep, this is a known feature that we want to add: #33
I've recently been performing a large-scale refactor of this gem and so I'm just now in a position to actually address some of these enhancements.
As a stopgap, we had a similar situation for a holiday in Japan. One way is to create a custom method and put the logic in there, like so: https://github.com/holidays/holidays/blob/master/definitions/jp.yaml#L177-L181
I'm going to leave this open for a bit so we can discuss this solution if you would like.
from holidays.
Small update: we have a PR that is addresses year cutoffs for holidays. That should get us closer to a solution. It can be found here #162
Once it is merged (just waiting on updated tests) I will see if I can fix the gb_sct
definitions using the new functionality.
from holidays.
Great, that's fantastic news!
2016-02-20 19:15 GMT+00:00 Phil Trimble [email protected]:
Small update: we have a PR that is addresses year cutoffs for holidays.
That should get us closer to a solution. It can be found here #162
#162Once it is merged (just waiting on updated tests) I will see if I can fix
the gb_sct definitions using the new functionality.β
Reply to this email directly or view it on GitHub
#161 (comment).
from holidays.
Sorry for the delay, I started working on this but then realized that my work on #144 being completed will make this all a lot easier. :-/
Once that is done this is next on my list.
from holidays.
Ah, excellent, thank you so much! I will check it out over the weekend.
S
2016-04-29 22:39 GMT+01:00 Phil Trimble [email protected]:
Hi @samstickland https://github.com/samstickland! Thanks for being SO.
PATIENT. with me as I worked through the other refactors. The fix in the
end was pretty simple thanks to the work done by @ttwo32
https://github.com/ttwo32 and the refactoring for the internal workings
for handling date modifying functions.If you would be so kind please take a quick look at the PR (#189
#189) and make sure that my
tests make sense. If you're happy with it then I'll go ahead and merge it
and get it out the door as a minor point release.Thanks again!
β
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#161 (comment)
from holidays.
Hi,
So it all looks OK to me, but I have just one question:
-
St. Andrew's Day is considered a formal bank holiday 2007 and later.
It should show up regardless of whether
-
:informal is specified
Does this mean that from 2007 St. Andrew's Day shows up if you search only
with informal?
S
2016-04-29 23:23 GMT+01:00 Sam Stickland [email protected]:
Ah, excellent, thank you so much! I will check it out over the weekend.
S
2016-04-29 22:39 GMT+01:00 Phil Trimble [email protected]:
Hi @samstickland https://github.com/samstickland! Thanks for being SO.
PATIENT. with me as I worked through the other refactors. The fix in the
end was pretty simple thanks to the work done by @ttwo32
https://github.com/ttwo32 and the refactoring for the internal
workings for handling date modifying functions.If you would be so kind please take a quick look at the PR (#189
#189) and make sure that my
tests make sense. If you're happy with it then I'll go ahead and merge it
and get it out the door as a minor point release.Thanks again!
β
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#161 (comment)
from holidays.
No, sorry, I can see how the comment is not entirely clear. What it means is that St Andrew's Day
will only show up as a holiday if :informal
is specified from 2006 and earlier. It will show up in either case from 2007 on.
Anything marked as informal
is ignored in normal gem usage. Think of the :informal
flag as saying 'give me all formal holidays PLUS any informal holidays that fall on the specified date(s)'. It's telling the gem to give more results than it normally gives (i.e. send back anything marked as 'informal' as well when it usually ignores informal holidays by default).
Concrete example:
Holidays.on(Date.civil(2007,11,30)) <- returns St Andrews Day
Holidays.on(Date.civil(2007,11,30), :informal) <- returns St Andrews Day
Holidays.on(Date.civil(2006,11,30)) <- Does NOT return St Andrews Day
Holidays.on(Date.civil(2006,11,30), :informal) <- returns St Andrews Day
Hopefully that makes sense. π
from holidays.
Ah yes, that does make sense. Thanks!
El 5/5/2016 12:21 a. m., "Phil Trimble" [email protected] escribiΓ³:
No, sorry, I can see how the comment is not entirely clear. What it means
is that St Andrew's Day will only show up as a holiday if :informal is
specified from 2006 and earlier. It will show up in either case from 2007
on.Anything marked as informal is ignored in normal gem usage. Think of the
:informal flag as saying 'give me all formal holidays PLUS any informal
holidays that fall on the specified date(s)'. It's telling the gem to give
more results than it normally gives (i.e. send back anything marked as
'informal' as well when it usually ignores informal holidays by default).Concrete example:
Holidays.on(Date.civil(2007,11,30)) <- returns St Andrews DayHolidays.on(Date.civil(2007,11,30), :informal) <- returns St Andrews DayHolidays.on(Date.civil(2006,11,30)) <- Does NOT return St Andrews DayHolidays.on(Date.civil(2006,11,30), :informal) <- returns St Andrews Day
Hopefully that makes sense. π
β
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#161 (comment)
from holidays.
Cool, closing this out and merging! Thanks for taking the time to work through this with me.
from holidays.
Related Issues (20)
- Get a list of all holidays possible for a given region
- Manage Belgium parent region HOT 1
- I have an issue with columbus day HOT 1
- Version Bump Request HOT 4
- Korea's new year get next year's new year
- Islamic holidays
- DΓa de los Muertos is not listed
- How to prevent stacked observed holidays HOT 1
- GB Substitute Days over Christmas and New Year HOT 1
- Liberation Day, Region NL
- Queen Elizabeth II passing Bank Holiday HOT 10
- Loading custom holidays clears all the provided definitions? HOT 1
- Strange behavoir with end_of_month HOT 2
- Feast of San Giusto for Trieste, Italy should be on 3rd November
- Shouldn't July 3, 2026 be "Independence Day (observed)" in the US? HOT 2
- Project updates HOT 10
- Hanukkah does not appear in list of holidays HOT 1
- Black Awareness Day is not listed for Brazil HOT 1
- Carnival 2024 Missing from Brazil Holidays Listing HOT 1
- Holidays.on returns results inconsistent with Holidays.between
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from holidays.