Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Time Series / Date functionality Holiday lookup - possible bug #11477
Comments
|
hmm, that does seem odd. cc @rockg |
jreback
added Bug Timeseries
labels
Oct 29, 2015
|
This is a little ugly. Basically since the real holiday is on the 4th, the first call doesn't get the 4th to apply its observance rule to the 3rd (as it's not in the range). The second call spans the 4th so the observance rule can be applied and the third call uses the cache from the second call. I suppose a simple solution is to always move the end date out a few days so that observance rules can be applied and then filtered for the given date range. |
|
That seems to work fine. Will submit the PR tomorrow morning as I came across a few more things that were odd. |
|
This seems a little counterintuitive but it makes sense to me:
|
vlmercado commentedOct 29, 2015
When trying to confirm if a specific date is an observed holiday using the specific date for the start and end range, the attempt fails to confirm a known observed holiday. It works as expected if I change the end date. When I try to use the same start and end date again, it works every time.
In 2015, the July 4th holiday was observed on July 3rd. Since a BDay() offset ignores holidays, a confirmation of an observed holiday failed when using July 3, 2015 for the start and end dates. See code below: