Skip to content
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

Interval Inconsistency #584

Closed
feyziemreoral opened this issue Oct 6, 2017 · 1 comment
Closed

Interval Inconsistency #584

feyziemreoral opened this issue Oct 6, 2017 · 1 comment
Labels
bug an unexpected problem or unintended behavior

Comments

@feyziemreoral
Copy link

feyziemreoral commented Oct 6, 2017

Hi

I'm new to GitHub.

I just noticed that the interval function is giving some unexpected results...

interval('2015-03-01', '2016-10-01') / months(1)
[1] 19
interval('2015-03-02', '2016-10-01') / months(1)
[1] 19.47541
interval('2015-03-03', '2016-10-01') / months(1)
[1] 18.93333

I would expect the output of the middle function to be between the first and third.

If I change the end period to 2015 I get what I would expect...

interval('2015-03-01', '2015-10-01') / months(1)
[1] 7
interval('2015-03-02', '2015-10-01') / months(1)
[1] 6.966667
interval('2015-03-03', '2015-10-01') / months(1)
[1] 6.933333

Am I missing something?

@vspinu
Copy link
Member

vspinu commented Oct 6, 2017

It's probably a bug. Division by month is rather flimsy.

@vspinu vspinu added the bug an unexpected problem or unintended behavior label Oct 6, 2017
vspinu added a commit that referenced this issue Oct 7, 2017
 ... and broken replication therein
@vspinu vspinu closed this as completed in 2c38627 Oct 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants