8000 Add the `fmt_duration()` function by rich-iannone · Pull Request #916 · rstudio/gt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add the fmt_duration() function #916

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

Merged
merged 69 commits into from
Jul 8, 2022
Merged

Add the fmt_duration() function #916

merged 69 commits into from
Jul 8, 2022

Conversation

rich-iannone
Copy link
Member

This PR adds the fmt_duration() function for formatting input values to time durations whether those input values are numbers or of the difftime class. We can specify which time units any numeric input values have (as days, hours, minutes, or seconds) and the output can be customized with a duration style (corresponding to short, long, and colon-separated forms) and a choice of output units from weeks to seconds.

Fixes: #403

rich-iannone and others added 21 commits April 19, 2022 17:45
* master: (30 commits)
  Update documentation
  `devtools::document()` (GitHub Actions)
  Improve layout of examples in documentation (#933)
  Update _pkgdown.yml
  Rename as `fmt_partsper()`; refactor
  Add several testthat tests
  Make corrections/additions to RTF marks
  Update help files using roxygen
  Update documentation
  Update help files using roxygen
  Update _pkgdown.yml
  Update NAMESPACE
  Rename function
  Renumber formatter functions
  Update _pkgdown.yml
  Update fmt_per.Rd
  Update format_data.R
  Update fmt_per.Rd
  Update format_data.R
  Improve regex for per mille|myriad in LaTeX output
  ...
@rich-iannone rich-iannone requested a review from cscheid July 7, 2022 23:19
628C
cscheid
cscheid previously approved these changes Jul 8, 2022
Copy link
Member
@cscheid cscheid left a comment

Choose a reason for hiding this comment

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

Aside from that one comment, lgtm.

@rich-iannone rich-iannone merged commit 9309aa3 into master Jul 8, 2022
@rich-iannone rich-iannone deleted the fmt-duration branch July 8, 2022 16:08
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.

Add a format function to make a duration value
3 participants
0