-
Notifications
You must be signed in to change notification settings - Fork 234
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
Allow ud_convert()
to work with class "difftime" (fix for #3012)
#3168
Conversation
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.
Looks great- just make sure to update the change log!
I can do this, but I'll just point out that the changelog already includes a bullet about this function being re-factored for this version. This bug was an unforseen side-effect of that refactoring |
Description
Fixes #3012 . Checks if argument
x
is difftime, and if it is converts it to aunits
object withas_units()
. Units are inferred from the class, so argumentu1
isn't actually used in the conversion in this case. UI is a little weird here, but seems like this is mostly an internal function so probably better than adding argument defaults and allowingu1
to beNULL
or something like that.Motivation and Context
Review Time Estimate
Types of changes
Checklist: