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

Strange behavior with subtract_time() %-time% #130

Open
spsanderson opened this issue Sep 2, 2022 · 2 comments
Open

Strange behavior with subtract_time() %-time% #130

spsanderson opened this issue Sep 2, 2022 · 2 comments

Comments

@spsanderson
Copy link

I think the output below says it all:

> "2022-08-30" %-time% "16 months"
[1] "2021-04-30"
> "2022-08-30" %-time% "17 months"
[1] "2021-03-30"
> "2022-08-30" %-time% "18 months"
[1] NA
Warning message:
In time_subtracter(index, period) :
  Missing values created during time subtraction. This can happen if dates do not exist.
> "2022-08-30" %-time% "24 months"
[1] "2020-08-30"
> "2022-08-30" %-time% "19 months"
[1] "2021-01-30"
> "2022-08-30" %-time% "18 months"
[1] NA

Just started happening today...

@mdancho84
Copy link
Contributor

The problem is February 30 does not exist so needs to be Feb 29.

Was this behavior different before?

@spsanderson
Copy link
Author

I never seemed to have the issue before this is the first time I have ever run into it.

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

No branches or pull requests

2 participants