Skip to content

Interval Inconsistency #584

Closed
Closed

Description

@feyziemreoral

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?

Activity

  1. vspinu commented on Oct 6, 2017

    @vspinu
    Member

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

  2. added
    bugan unexpected problem or unintended behavior
    on Oct 6, 2017
  3. added a commit that references this issue on Oct 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions