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

Add function for checking date types #48

Closed
wants to merge 2 commits into from
Closed

Add function for checking date types #48

wants to merge 2 commits into from

Conversation

Moohan
Copy link
Member

@Moohan Moohan commented Dec 23, 2020

Resolves #47

Copy link
Contributor

@davidc92 davidc92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi James, before I review this can you please fix the problem that's causing the build to fail with Travis?

@Moohan
Copy link
Member Author

Moohan commented Jan 18, 2021

Hi James, before I review this can you please fix the problem that's causing the build to fail with Travis?

That should be it, it just wanted a bit of extra documentation. Sorry, thought I had run a full check before submitting! The checks definitely pass on the server now, so hopefully Travis will report the same shortly!

@Moohan
Copy link
Member Author

Moohan commented Jan 18, 2021

I've just had a thought that it would probably make more sense to move the whole if (!is_date(date)) stop("The input must have Date or POSIXct class") bit into the function so that it could just be used as is_date(date).

Let me know if you want me to refactor like that?

@davidc92
Copy link
Contributor

Actually, I've taken a look at what this PR is doing and I don't like creating a new function which is just another function with a different name. If the problem is the error handling in qtr is too strict, then can you just add the extra arguments to the inherits function rather than wrapping an extra layer of functions around it?

@Moohan
Copy link
Member Author

Moohan commented Mar 24, 2021

Closing this as there is a simpler fix in #50 as suggested by @davidc92

@Moohan Moohan closed this Mar 24, 2021
@Moohan Moohan deleted the date_checks branch May 21, 2021 10:01
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.

qtr only accepts lubridate date types
2 participants