Skip to content

Conversation

@etiennebacher
Copy link
Collaborator

Part of #1397

Copilot AI review requested due to automatic review settings November 19, 2025 21:53
Copilot finished reviewing on behalf of etiennebacher November 19, 2025 21:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements the <expr>$dt$days_in_month() method for extracting the number of days in a month from date expressions, addressing part of issue #1397. The implementation follows the established pattern for datetime extraction methods in the R Polars package.

Key Changes

  • Added dt_days_in_month() Rust binding that calls the underlying Polars library method
  • Created R wrapper function expr_dt_days_in_month() with documentation and examples
  • Added comprehensive test coverage including leap year handling

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/rust/src/expr/datetime.rs Added Rust binding for days_in_month method
R/expr-datetime.R Implemented R wrapper function with roxygen2 documentation
R/000-wrappers.R Auto-generated savvy wrapper for the new method
src/rust/api.h Auto-generated C API header declaration
src/init.c Auto-generated C initialization code for R interface
man/expr_dt_days_in_month.Rd Auto-generated R documentation from roxygen2 comments
tests/testthat/test-expr-datetime.R Added test verifying correct output including leap year (Feb 2020 = 29 days)
NEWS.md Added entry documenting the new feature

@eitsupi eitsupi merged commit 14d60a5 into main Nov 20, 2025
25 checks passed
@eitsupi eitsupi deleted the dt_days_in_month branch November 20, 2025 16:13
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.

3 participants