jonkeane commented on a change in pull request #12353:
URL: https://github.com/apache/arrow/pull/12353#discussion_r803893141
##########
File path: r/R/dplyr-funcs-datetime.R
##########
@@ -148,4 +148,56 @@ register_bindings_datetime <- function() {
!call_binding("am", x)
})
+ register_binding("ymd", function(x) {
+ format_map <-
+ list(
+ ymd_hyphen1 = "%Y-%m-%d",
+ ymd_hyphen2 = "%y-%m-%d",
+ ymd_hyphen3 = "%Y-%B-%d",
+ ymd_hyphen4 = "%y-%B-%d",
+ ymd_hyphen5 = "%Y-%b-%d",
+ ymd_hyphen6 = "%y-%b-%d",
Review comment:
> coalesce() needs the first call to call_binding("strptime") to return
NA in order to move on to the second one and so on. Instead the first call
errors and the second one never get evaluated. tryCatch() doesn't seem to work
in this context.
Good point! Is there a jira to make that a possibility for the `strptime`
binding (or in the C++ itself, which is the ultimate place it'll really need to
be...)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]