Skip to content

fix business day calculation #5220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2013
Merged

fix business day calculation #5220

merged 1 commit into from
Oct 15, 2013

Conversation

wuan
Copy link
Contributor

@wuan wuan commented Oct 14, 2013

This will fix the so far broken calculation of business day periods and the corresponding tests reported

closes #5203.

The expected behaviour found in the present tests is that the date is always rolling forward to the next business day:

Friday:   Period('2012-3-09', freq='B') => '2012-03-09'
Saturday: Period('2012-3-10', freq='B') => '2012-03-12'
Sunday:   Period('2012-3-11', freq='B') => '2012-03-12'
Monday:   Period('2012-3-12', freq='B') => '2012-03-12'

Can anyone confirm this?

@cancan101
Copy link
Contributor

For reference, what do any other periods do when the date passed in does not actually match the desired frequency.

@jreback jreback merged commit 688834a into pandas-dev:master Oct 15, 2013
@jreback
Copy link
Contributor

jreback commented Oct 15, 2013

@wuan thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: period on weekends rolling to odd business days
3 participants