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

[R] Bindings for strftime #18755

Closed
asfimport opened this issue Jul 26, 2021 · 2 comments
Closed

[R] Bindings for strftime #18755

asfimport opened this issue Jul 26, 2021 · 2 comments

Comments

@asfimport
Copy link

asfimport commented Jul 26, 2021

Following ARROW-13174

Reporter: Neal Richardson / @nealrichardson
Assignee: Rok Mihevc / @rok
Watchers: Rok Mihevc / @rok

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-13448. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Rok Mihevc / @rok:
I'd suggest the following binding for StrftimeOptions in compute.cpp:

  if (func_name == "strftime") {
    using Options = arrow::compute::StrftimeOptions;
    std::string format = "%Y-%m-%dT%H:%M:%SZ";
    std::string locale = "C";
    if (!Rf_isNull(options["format"])) {
      format = cpp11::as_cpp<std::string>(options["format"]);
    }
    if (!Rf_isNull(options["locale"])) {
      locale = cpp11::as_cpp<std::string>(options["locale"]);
    }
    return std::make_shared<Options>(Options(format, locale));
  }

@asfimport
Copy link
Author

Jonathan Keane / @jonkeane:
Issue resolved by pull request 11105
#11105

@asfimport asfimport added this to the 6.0.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants