{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/10978","labels_url":"https://api.github.com/repos/pydata/pandas/issues/10978/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/10978/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/10978/events","html_url":"https://github.com/pydata/pandas/issues/10978","id":104639262,"number":10978,"title":"BDay offset behaviour vs docs & implementation","user":{"login":"devqinves","id":14105677,"avatar_url":"https://avatars.githubusercontent.com/u/14105677?v=3","gravatar_id":"","url":"https://api.github.com/users/devqinves","html_url":"https://github.com/devqinves","followers_url":"https://api.github.com/users/devqinves/followers","following_url":"https://api.github.com/users/devqinves/following{/other_user}","gists_url":"https://api.github.com/users/devqinves/gists{/gist_id}","starred_url":"https://api.github.com/users/devqinves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devqinves/subscriptions","organizations_url":"https://api.github.com/users/devqinves/orgs","repos_url":"https://api.github.com/users/devqinves/repos","events_url":"https://api.github.com/users/devqinves/events{/privacy}","received_events_url":"https://api.github.com/users/devqinves/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Docs","name":"Docs","color":"3465A4"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Frequency","name":"Frequency","color":"0052cc"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Needs%20Discussion","name":"Needs Discussion","color":"207de5"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Usage%20Question","name":"Usage Question","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-03T07:41:36Z","updated_at":"2015-09-03T14:08:12Z","closed_at":null,"body":"apologies if this has already been raised but couldn't find an answer.\r\n  \r\nfrom the docs : \r\n\r\nDateOffsets can be created to move dates forward a given number of valid dates.  For example, Bday(2) can be added to a date to move it two business days forward.  If the date does not start on a valid date, first it is moved to a valid date. \r\n\r\npd.Timestamp('20150830')+BDay(0) == pd.Timestamp('20150830')+BDay(1)  is True\r\n\r\nit doesn't move it first to a valid date and the code seem to confirm that. not sure what's the intended behaviour here but would be great to clarify. thanks in advance.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/137461143","html_url":"https://github.com/pydata/pandas/issues/10978#issuecomment-137461143","issue_url":"https://api.github.com/repos/pydata/pandas/issues/10978","id":137461143,"user":{"login":"chris-b1","id":1924092,"avatar_url":"https://avatars.githubusercontent.com/u/1924092?v=3","gravatar_id":"","url":"https://api.github.com/users/chris-b1","html_url":"https://github.com/chris-b1","followers_url":"https://api.github.com/users/chris-b1/followers","following_url":"https://api.github.com/users/chris-b1/following{/other_user}","gists_url":"https://api.github.com/users/chris-b1/gists{/gist_id}","starred_url":"https://api.github.com/users/chris-b1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris-b1/subscriptions","organizations_url":"https://api.github.com/users/chris-b1/orgs","repos_url":"https://api.github.com/users/chris-b1/repos","events_url":"https://api.github.com/users/chris-b1/events{/privacy}","received_events_url":"https://api.github.com/users/chris-b1/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T14:08:12Z","updated_at":"2015-09-03T14:08:12Z","body":"It's kind of inconsistent with the `Period` behavior e,g:\r\n\r\n    In [59]: d = pd.Timestamp('20150830')\r\n\r\n    In [61]: (d.to_period('B') + 1).to_timestamp()\r\n    Out[61]: Timestamp('2015-09-01 00:00:00')\r\n\r\n    In [64]: (d + BDay(1))\r\n    Out[64]: Timestamp('2015-08-31 00:00:00')\r\n\r\nBut I also feel like the ship may have sailed - I believe all of the other anchored offsets work like this too:\r\n\r\n     In [66]: d + pd.offsets.MonthEnd(1)\r\n     Out[66]: Timestamp('2015-08-31 00:00:00')\r\n\r\n\r\n"}}