-
Notifications
You must be signed in to change notification settings - Fork 207
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
Date coercion #389
Date coercion #389
Conversation
Due to editor default on save
Otherwise clashes with S3 method argument names
@@ -608,3 +608,43 @@ setMethod("as.character", signature(x = "Duration"), function(x, ...){ | |||
setMethod("as.character", signature(x = "Interval"), function(x, ...){ | |||
format(x) | |||
}) | |||
|
|||
|
|||
#' Change an object to a Date |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should probably be "convert".
As to the commiting style, could you please keep related changes in one commit whenever possible? No need to split out documentation, roxigenization and news addition steps. All of these are a single change - adding one feature. Also could you please add a test case as per #355? |
Hi Imanuel. What is the status of this? Do you plan to address my other comments and add tests? I would like to release by the end of this week. I can merge what you have so far and amend those myself if you don't have time. |
@vspinu I'm unlikely to get time before end of the week. In terms of commit style - sure. Suggest that you consider adding a CONTRIBUTING file to repo with this and other expectations. |
Ok. I will then merge manually your changes these days then leave for another shelve for 5-6 days before the final release. Will add the CONTRIBUTING file. Thanks for the idea. |
@vspinu found myself with some time tonight. Have added test cases and default method as requested. |
There are merge conflicts. I am merging it right now. By "default" I meant to use BTW, why do you need a method for "character"? as.Date does good job there. No? |
|
Performance is not an issue. We are defaulting to as.Date anyways. So character input will drop into |
Btw see https://github.com/blog/2141-squash-your-commits for setting your repo up to squash commits rather than requiring contributors to do so |
Address #355:
as_date
genericas.Date
S3 methods) with sensible defaultsNB: