Skip to content

Commit

Permalink
use lubridate
Browse files Browse the repository at this point in the history
  • Loading branch information
BFalquet committed May 15, 2024
1 parent 5313794 commit 5034160
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Imports:
glue (>= 1.0.0),
grid,
lifecycle (>= 0.2.0),
lubridate,
magrittr (>= 1.5),
methods,
nestcolor (>= 0.1.1),
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ importFrom(glue,glue)
importFrom(grid,stringWidth)
importFrom(grid,unit)
importFrom(lifecycle,deprecated)
importFrom(lubridate,date)
importFrom(magrittr,"%>%")
importFrom(methods,is)
importFrom(methods,setValidity)
Expand Down
1 change: 1 addition & 0 deletions R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#' @importFrom grid stringWidth unit
#' @importFrom glue glue
#' @importFrom lifecycle deprecated
#' @importFrom lubridate date
#' @importFrom magrittr %>%
#' @importFrom methods is setValidity
#' @importFrom nestcolor color_palette
Expand Down
8 changes: 7 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,13 @@ listing_format_chevron <- function() {
#'
format_date <- function(date_format = "%d%b%Y") {
function(x, ...) {
toupper(strftime(x, format = date_format))
toupper(
format(
# Extract the date at the location of the measure, not at the location of the System.
lubridate::date(x),
date_format
)
)
}
}

Expand Down

0 comments on commit 5034160

Please sign in to comment.