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

add week_start parameter to round.IDate #6025

Draft
wants to merge 8 commits into
base: round-idate-yday
Choose a base branch
from

Conversation

MichaelChirico
Copy link
Member

@MichaelChirico MichaelChirico commented Mar 27, 2024

Quite unfortunately, this doesn't work -- round() MUST have exactly two arguments. See ?Math2 of which round() and signif() are the only (current) members.

Relevant r-devel thread very recently about how useless round.Date() is:

https://stat.ethz.ch/pipermail/r-devel/2024-February/083182.html

Directly relevant r-devel thread from a few years ago about extending the round() generic:

https://stat.ethz.ch/pipermail/r-devel/2021-January/080427.html

Copy link
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @MichaelChirico and the rest of your teammates on Graphite Graphite

@MichaelChirico
Copy link
Member Author

IINM it seems we have a situation where we can define round to use week_start on the current version of r-devel but this won't work in earlier versions.

WDYT about this @jangorecki? It seems OK to me (having a feature which is only available for certain R version).

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.53%. Comparing base (7f767a0) to head (74f9a7f).

Additional details and impacted files
@@                Coverage Diff                @@
##           round-idate-yday    #6025   +/-   ##
=================================================
  Coverage             97.53%   97.53%           
=================================================
  Files                    80       80           
  Lines                 14915    14915           
=================================================
  Hits                  14547    14547           
  Misses                  368      368           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jangorecki
Copy link
Member

WDYT about this @jangorecki? It seems OK to me (having a feature which is only available for certain R version).

seems OK to me as well

@MichaelChirico
Copy link
Member Author

NB: Keep this as draft until any R version supporting ... in round() is officially released. Wouldn't want to ship a feature that's strictly dependent on devel-only R features.

@MichaelChirico MichaelChirico added this to the 1.16.0 milestone Mar 28, 2024
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.

None yet

2 participants