← all packages

prettyunits

no native code · R: 19 definitions, 0 typed strict, 12 gradual, prelude debt 6 · fuzzing: 0 definitions, 0 unsound, 0 accept calls outside their domain · tyr dc7f1a7 · Rsem 7bcb45f · NativeSem 770a1eb · rstt 2b2696f unpinned

R definitions

named top-level definitions
19 / 19 (100.0%)
not blocked by an unbound native symbol
19 / 19 (100.0%)
typed, gradual
12 / 19 (63.2%)
typed, strict
0 / 19 (0.0%)
6 of the strict failures are a name missing from the prelude.
mode
21 / 21

R definitions 21

R/color.R

color_diff_cie76 untypeabletyped

unbound variable (line 49)
unbound: t — a name the prelude does not declare
error detail
name: t
gradual mode: typed
((color: list, refs: any) | (color: vec | null, refs: any) -> any)<>
timing: 0.015 s
source
color_diff_cie76 <- function(color, refs) {
  d <- t(refs) - c(color)
  sqrt(colSums(d * d))
}
R/color.R:48

pretty_color untypeabletyped

unbound variable (line 18)
unbound: col2rgb — a name the prelude does not declare
error detail
name: col2rgb
gradual mode: typed
((color: CHR) -> any)<>
timing: 0.274 s
source
pretty_color <- function(color) {
  stopifnot(length(color) == 1)
  if (is.na(color)) {
    structure(NA_character_, alt = NA_character_)
  } else {
    if (is.factor(color)) color <- as.character(color)
    stopifnot(is.character(color))
    color_rgb <- col2rgb(color)
    color_lab <- convertColor(t(color_rgb), from = "sRGB", to = "Lab", scale.in = 256)
    dist <- color_diff_cie76(
      color_lab,
      as.matrix(color_reference[, c("L", "a", "b")])
    )
    ret <- color_reference$name[dist == min(dist)][1]
    attr(ret, "alt") <- color_reference$name_alt[dist == min(dist)][[1]]
    ret
  }
}
R/color.R:11

pretty_colour untypeabletyped

unbound variable (line 32)
unbound: pretty_color — one of the package’s own names, itself untyped
error detail
name: pretty_color
gradual mode: typed
((color: CHR) -> any)<>
timing: 0.000 s
source
pretty_colour <- pretty_color
R/color.R:32

<statement> typed

timing: 0.000 s
source
NULL
R/color.R:46
R/xnumbers-docs.R

pretty_num untypeabletyped

unbound variable (line 27)
unbound: format_num — one of the package’s own names, itself untyped
error detail
name: format_num
gradual mode: typed
any
timing: 0.000 s
source
pretty_num <- format_num$pretty_num
R/xnumbers-docs.R:27

compute_num untypeabletyped

unbound variable (line 33)
unbound: format_num — one of the package’s own names, itself untyped
error detail
name: format_num
gradual mode: typed
any
timing: 0.000 s
source
compute_num <- format_num$compute_num
R/xnumbers-docs.R:33
R/numbers.R

format_num untypeabletimeout

unbound variable (line 30)
unbound: match — a name the prelude does not declare
error detail
name: match
gradual mode: timeout
timing: 5.64 s
source
format_num <- local({

  pretty_num <- function(number, style = c("default", "nopad", "6")) {

    style <- switch(
      match.arg(style),
      "default" = pretty_num_default,
      "nopad" = pretty_num_nopad,
      "6" = pretty_num_6
    )

    style(number)
  }

  compute_num <- function(number, smallest_prefix = "y") {
    prefixes0 <- c("y","z","a","f","p","n","u","m","", "k", "M", "G", "T", "P", "E", "Z", "Y")
    zeroshif0 <- 9L
    
    stopifnot(
      is.numeric(number),
      is.character(smallest_prefix),
      length(smallest_prefix) == 1,
      !is.na(smallest_prefix),
      smallest_prefix %in% prefixes0
    )
    
    limits <- c( 999950 * 1000 ^ (seq_len(length(prefixes0) ) - (zeroshif0+1L)))
    nrow <- length(limits)
    low <- match(smallest_prefix, prefixes0)
    zeroshift <- zeroshif0 +1L - low
    prefixes <- prefixes0[low:length(prefixes0)]
    limits <- limits[low:nrow]
    nrow <- nrow - low + 1

    neg <- number < 0 & !is.na(number)
    number <- abs(number)
    mat <- matrix(
      rep(number, each = nrow),
      nrow = nrow,
      ncol = length(number)
    )
    mat2 <- matrix(mat < limits, nrow  = nrow, ncol = length(number))
    exponent <- nrow - colSums(mat2) - (zeroshift -1L)
    in_range <- function(exponent) {
        max(min(exponent,nrow-zeroshift, na.rm = FALSE),1L-zeroshift, na.rm = TRUE)
    }
    if (length(exponent)) {
      exponent <- sapply(exponent, in_range)
    }
    res <- number / 1000 ^ exponent
    prefix <- prefixes[exponent + zeroshift]

    ## Zero number
    res[number == 0] <- 0
    prefix[number == 0] <- prefixes[zeroshift]

    ## NA and NaN number
    res[is.na(number)] <- NA_real_
    res[is.nan(number)] <- NaN
    prefix[is.na(number)] <- "" # prefixes0[low] is meaningless    # Includes NaN as well

    data.frame(
      stringsAsFactors = FALSE,
      amount = res,
      prefix = prefix,
      negative = neg
    )
  }

  pretty_num_default <- function(number) {
    szs <- compute_num(number)
    amt <- szs$amount
    sep <- " "

    ## String. For fractions we always show two fraction digits
    res <- character(length(amt))
    int <- is.na(amt) | abs(amt - as.integer(amt)) <= .Machine$double.eps
    res[int] <- format(
      ifelse(szs$negative[int], -1, 1) * amt[int],
      scientific = FALSE
    )
    res[!int] <- sprintf("%.2f", ifelse(szs$negative[!int], -1, 1) * amt[!int])

    format(paste(res, szs$prefix,sep = sep), justify = "right")
  }

  pretty_num_nopad <- function(number) {
    sub("^\\s+", "", pretty_num_default(number))
  }

  pretty_num_6 <- function(number) {
    szs <- compute_num(number, smallest_prefix = "y")
    amt <- round(szs$amount,2)
    sep <- " "

    na   <- is.na(amt)
    nan  <- is.nan(amt)
    neg  <- !na & !nan & szs$negative
    l10p  <- !na & !nan & !neg & amt < 10
    l100p <- !na & !nan & !neg & amt >= 10 & amt < 100
    b100p <- !na & !nan & !neg & amt >= 100
    l10n  <- !na & !nan & neg & amt < 10
    l100n <- !na & !nan & neg & amt >= 10 & amt < 100
    b100n <- !na & !nan & neg & amt >= 100

    famt <- character(length(amt))
    famt[na] <- "  NA"
    famt[nan] <- " NaN"
    famt[l10p] <- sprintf("%.2f", amt[l10p])
    famt[l100p] <- sprintf("%.1f", amt[l100p])
    famt[b100p] <- sprintf(" %.0f", amt[b100p])
    famt[l10n] <- sprintf("-%.1f", amt[l10n])
    famt[l100n] <- sprintf(" -%.0f", amt[l100n])
    famt[b100n] <- sprintf("-%.0f", amt[b100n])

    sub(" $","  ",paste0(famt, sep, szs$prefix))
  }

  structure(
    list(
      .internal     = environment(),
      pretty_num  = pretty_num,
      compute_num = compute_num
    ),
    class = c("standalone_num", "standalone")
  )
})
R/numbers.R:2
R/rounding.R

pretty_round untypeable

untypeable application of base::[] (line 39)
error detail
argument: @((CHR | LGL) | v('I792), lgl<>)
failing call: base::[](NA, as.raw(0))
timing: 3.57 s
source
pretty_round <- function(x, digits = 0, sci_range = Inf, sci_sep = "e") {
  if (length(digits) == 1) {
    mask_na <- is.na(x)
    mask_aschar <- is.nan(x) | is.infinite(x)
    mask_manip <- !(mask_na | mask_aschar)
    ret <- rep(NA, length(x))
    ## Put in the special values
    if (any(mask_na)) {
      ret[mask_na] <- "NA"
    }
    if (any(mask_aschar)) {
      ret[mask_aschar] <- as.character(x[mask_aschar])
    }
    if (any(mask_manip)) {
      xtmp <- round(x[mask_manip], digits)
      mask_sci <-
        xtmp != 0 &
          abs(log10(abs(xtmp))) >= sci_range
      mask_no_sci <- !mask_sci
      if (any(mask_sci)) {
        logval <- floor(log10(abs(xtmp[mask_sci])))
        ret[mask_manip][mask_sci] <-
          paste0(
            formatC(xtmp[mask_sci] / 10^logval, format = "f", digits = digits + logval),
            sci_sep,
            formatC(logval, format = "d")
          )
      }
      if (any(mask_no_sci)) {
        if (digits < 0) {
          ret[mask_manip][mask_no_sci] <-
            formatC(xtmp[mask_no_sci], format = "f", digits = 0)
        } else {
          ret[mask_manip][mask_no_sci] <-
            formatC(xtmp[mask_no_sci], format = "f", digits = digits)
        }
      }
    }
    ret
  } else if (length(x) == length(digits)) {
    mapply(pretty_round, x, digits = digits, sci_range = sci_range, sci_sep = sci_sep)
  } else {
    stop("digits must either be a scalar or the same length as x")
  }
}
R/rounding.R:18

pretty_signif untypeable

untypeable application of base::round (line 112)
error detail
argument: @((dbl & v('I976))<>, digits: (DBL | INT | LGL) | v('I1011))
failing call: base::round(as.raw(0), digits = NA)
timing: 4.97 s
source
pretty_signif <- function(x, digits = 6, sci_range = 6, sci_sep = "e") {
  mask_na <- is.na(x)
  mask_aschar <- is.nan(x) | is.infinite(x)
  mask_manip <- !(mask_na | mask_aschar)
  ret <- rep(NA, length(x))
  ## Put in the special values
  if (any(mask_na)) {
    ret[mask_na] <- "NA"
  }
  if (any(mask_aschar)) {
    ret[mask_aschar] <- as.character(x[mask_aschar])
  }
  if (any(mask_manip)) {
    xtmp <- x[mask_manip]
    toplog <- bottomlog <- rep(NA, length(xtmp))
    ## When 0 give the digits as the output
    bottomlog[xtmp %in% 0] <- digits
    ## Otherwise set it to digits orders of magnitude lower than the
    ## current value
    toplog <- log10(abs(xtmp))
    ## When the order of magnitude is an exact log 10, move up one so
    ## that the math works for determing the lower log.
    mask.exact.log <- (toplog %% 1) %in% 0
    toplog[mask.exact.log] <- toplog[mask.exact.log] + 1
    toplog <- ceiling(toplog)
    bottomlog[is.na(bottomlog)] <- digits - toplog[is.na(bottomlog)]
    ## Find times when rounding increases the toplog and shift up the
    ## bottomlog to a corresponding degree. e.g. x=0.9999 and digits=2
    ## should be 1.0 not 1.00.
    newtoplog <- log10(abs(round(xtmp, digits = bottomlog)))
    mask.exact.log <- (newtoplog %% 1) %in% 0
    newtoplog[mask.exact.log] <- newtoplog[mask.exact.log] + 1
    newtoplog <- ceiling(newtoplog)
    mask.move.up <- toplog < newtoplog
    bottomlog[mask.move.up] <- bottomlog[mask.move.up] - 1
    ## Do the rounding
    ret[mask_manip] <- pretty_round(xtmp,
      digits = bottomlog,
      sci_range = sci_range, sci_sep = sci_sep
    )
  }
  ret
}
R/rounding.R:83
R/p-value.R

pretty_p_value timeout

timing: 20.00 s
source
pretty_p_value <- function(x, minval = 0.0001) {
  stopifnot(is.numeric(minval) & !is.factor(minval) & !is.na(minval))
  stopifnot(minval < 1 & minval > 0)
  ret <- rep(NA_character_, length(x))
  if (!all(is.na(x))) {
    # The input check on x class and value is here to allow for inputs of all NA
    # values to be of any class.
    stopifnot(is.numeric(x) & !is.factor(x))
    stopifnot(is.na(x) | (x <= 1 & x >= 0))
    ndigits <- -floor(log10(minval))
    mask_min <- !is.na(x) & x < minval
    mask_over <- !is.na(x) & x >= minval
    ret[mask_min] <- paste0("<", pretty_round(minval, digits = ndigits))
    ret[mask_over] <- pretty_round(x[mask_over], digits = ndigits)
  }
  ret
}
R/p-value.R:12
R/pretty-package.R

<statement> typed

timing: 0.003 s
source
"_PACKAGE"
R/pretty-package.R:13
R/xsizes-docs.R

pretty_bytes untypeabletyped

unbound variable (line 27)
unbound: format_bytes — one of the package’s own names, itself untyped
error detail
name: format_bytes
gradual mode: typed
any
timing: 0.000 s
source
pretty_bytes <- format_bytes$pretty_bytes
R/xsizes-docs.R:27

compute_bytes untypeabletyped

unbound variable (line 33)
unbound: format_bytes — one of the package’s own names, itself untyped
error detail
name: format_bytes
gradual mode: typed
any
timing: 0.001 s
source
compute_bytes <- format_bytes$compute_bytes
R/xsizes-docs.R:33
R/sizes.R

format_bytes untypeabletimeout

unbound variable (line 28)
unbound: match — a name the prelude does not declare
error detail
name: match
gradual mode: timeout
timing: 4.64 s
source
format_bytes <- local({

  pretty_bytes <- function(bytes, style = c("default", "nopad", "6")) {

    style <- switch(
      match.arg(style),
      "default" = pretty_bytes_default,
      "nopad" = pretty_bytes_nopad,
      "6" = pretty_bytes_6
    )

    style(bytes)
  }

  compute_bytes <- function(bytes, smallest_unit = "B") {
    units0 <- c("B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB")

    stopifnot(
      is.numeric(bytes),
      is.character(smallest_unit),
      length(smallest_unit) == 1,
      !is.na(smallest_unit),
      smallest_unit %in% units0
    )

    limits <- c(1000, 999950 * 1000 ^ (seq_len(length(units0) - 2) - 1))
    low <- match(smallest_unit, units0)
    units <- units0[low:length(units0)]
    limits <- limits[low:length(limits)]

    neg <- bytes < 0 & !is.na(bytes)
    bytes <- abs(bytes)

    mat <- matrix(
      rep(bytes, each = length(limits)),
      nrow = length(limits),
      ncol = length(bytes)
    )
    mat2 <- matrix(mat < limits, nrow  = length(limits), ncol = length(bytes))
    exponent <- length(limits) - colSums(mat2) + low - 1L
    res <- bytes / 1000 ^ exponent
    unit <- units[exponent - low + 2L]

    ## Zero bytes
    res[bytes == 0] <- 0
    unit[bytes == 0] <- units[1]

    ## NA and NaN bytes
    res[is.na(bytes)] <- NA_real_
    res[is.nan(bytes)] <- NaN
    unit[is.na(bytes)] <- units0[low]     # Includes NaN as well

    data.frame(
      stringsAsFactors = FALSE,
      amount = res,
      unit = unit,
      negative = neg
    )
  }

  pretty_bytes_default <- function(bytes) {
    szs <- compute_bytes(bytes)
    amt <- szs$amount

    ## String. For fractions we always show two fraction digits
    res <- character(length(amt))
    int <- is.na(amt) | amt == as.integer(amt)
    res[int] <- format(
      ifelse(szs$negative[int], -1, 1) * amt[int],
      scientific = FALSE
    )
    res[!int] <- sprintf("%.2f", ifelse(szs$negative[!int], -1, 1) * amt[!int])

    format(paste(res, szs$unit), justify = "right")
  }

  pretty_bytes_nopad <- function(bytes) {
    sub("^\\s+", "", pretty_bytes_default(bytes))
  }

  pretty_bytes_6 <- function(bytes) {
    szs <- compute_bytes(bytes, smallest_unit = "kB")
    amt <- szs$amount

    na   <- is.na(amt)
    nan  <- is.nan(amt)
    neg  <- !na & !nan & szs$negative
    l10  <- !na & !nan & !neg & amt < 10
    l100 <- !na & !nan & !neg & amt >= 10 & amt < 100
    b100 <- !na & !nan & !neg & amt >= 100

    szs$unit[neg] <- "kB"

    famt <- character(length(amt))
    famt[na] <- " NA"
    famt[nan] <- "NaN"
    famt[neg] <- "< 0"
    famt[l10] <- sprintf("%.1f", amt[l10])
    famt[l100] <- sprintf(" %.0f", amt[l100])
    famt[b100] <- sprintf("%.0f", amt[b100])

    paste0(famt, " ", szs$unit)
  }

  structure(
    list(
      .internal     = environment(),
      pretty_bytes  = pretty_bytes,
      compute_bytes = compute_bytes
    ),
    class = c("standalone_bytes", "standalone")
  )
})
R/sizes.R:2
R/xtime-ago.R

time_ago untypeabletyped

unbound variable (line 47)
unbound: format_time_ago — one of the package’s own names, itself untyped
error detail
name: format_time_ago
gradual mode: typed
any
timing: 0.000 s
source
time_ago <- format_time_ago$time_ago
R/xtime-ago.R:47

vague_dt untypeabletyped

unbound variable (line 87)
unbound: format_time_ago — one of the package’s own names, itself untyped
error detail
name: format_time_ago
gradual mode: typed
any
timing: 0.000 s
source
vague_dt <- format_time_ago$vague_dt
R/xtime-ago.R:87
R/time-ago.R

format_time_ago untypeabletimeout

unbound variable (line 4)
unbound: expression — a name the prelude does not declare
error detail
name: expression
gradual mode: timeout
timing: 0.204 s
source
format_time_ago <- local({

  e <- expression

  `%s%` <- function(lhs, rhs) {
    assert_string(lhs)
    do.call(
      sprintf,
      c(list(lhs), as.list(rhs))
    )
  }

  assert_string <- function(x) {
    stopifnot(is.character(x), length(x) == 1L)
  }

  assert_diff_time <- function(x) {
    stopifnot(inherits(x, "difftime"))
  }

  vague_dt_default <- list(
    list(c = e(seconds < 10), s = "moments ago"),
    list(c = e(seconds < 45), s = "less than a minute ago"),
    list(c = e(seconds < 90), s = "about a minute ago"),
    list(c = e(minutes < 45), s = e("%d minutes ago" %s% round(minutes))),
    list(c = e(minutes < 90), s = "about an hour ago"),
    list(c = e(hours < 24),   s = e("%d hours ago" %s% round(hours))),
    list(c = e(hours < 42),   s = "a day ago"),
    list(c = e(days < 30),    s = e("%d days ago" %s% round(days))),
    list(c = e(days < 45),    s = "about a month ago"),
    list(c = e(days < 335),   s = e("%d months ago" %s% round(days / 30))),
    list(c = e(years < 1.5),  s = "about a year ago"),
    list(c = TRUE,            s = e("%d years ago" %s% round(years)))
  )

  vague_dt_short <- list(
    list(c = e(seconds < 50), s = "<1 min"),
    list(c = e(minutes < 50), s = e("%d min" %s% round(minutes))),
    list(c = e(hours < 1.5),  s = "1 hour"),
    list(c = e(hours < 18),   s = e("%d hours" %s% round(hours))),
    list(c = e(hours < 42),   s = "1 day"),
    list(c = e(days < 30),    s = e("%d day" %s% round(days))),
    list(c = e(days < 45),    s = "1 mon"),
    list(c = e(days < 335),   s = e("%d mon" %s% round(days / 30))),
    list(c = e(years < 1.5),  s = "1 year"),
    list(c = TRUE,            s = e("%d years" %s% round(years)))
  )

  vague_dt_terse <- list(
    list(c = e(seconds < 50), s = e("%2ds" %s% round(seconds))),
    list(c = e(minutes < 50), s = e("%2dm" %s% round(minutes))),
    list(c = e(hours < 18),   s = e("%2dh" %s% round(hours))),
    list(c = e(days < 30),    s = e("%2dd" %s% round(days))),
    list(c = e(days < 335),   s = e("%2dM" %s% round(days / 30))),
    list(c = TRUE,            s = e("%2dy" %s% round(years)))
  )

  vague_dt_formats <- list(
    "default" = vague_dt_default,
    "short" = vague_dt_short,
    "terse" = vague_dt_terse
  )

  time_ago <- function(date, format = c("default", "short", "terse")) {

    date <- as.POSIXct(date)

    if (length(date) > 1) return(sapply(date, time_ago, format = format))

    seconds <- difftime(Sys.time(), date, units = "secs")

    vague_dt(seconds, format = format)
  }

  vague_dt <- function(dt, format = c("default", "short", "terse")) {

    assert_diff_time(dt)

    units(dt) <- "secs"
    seconds <- as.vector(dt)

    ## Simplest to quit here for empty input
    if (!length(seconds)) return(character())

    pieces <- list(
      minutes = seconds / 60,
      hours = seconds / 60 / 60,
      days = seconds / 60 / 60 / 24,
      years = seconds / 60 / 60 / 24 / 365.25
    )

    format <- match.arg(format)

    for (p in vague_dt_formats[[format]]) {
      if (eval(p$c, pieces)) return(eval(p$s, pieces))
    }
  }

  structure(
    list(
      .internal = environment(),
      time_ago = time_ago,
      vague_dt = vague_dt
    ),
    class = c("standalone_time_ago", "standalone")
  )
})
R/time-ago.R:2
R/xtime.R

pretty_ms untypeabletyped

unbound variable (line 17)
unbound: format_time — one of the package’s own names, itself untyped
error detail
name: format_time
gradual mode: typed
any
timing: 0.000 s
source
pretty_ms <- format_time$pretty_ms
R/xtime.R:17

pretty_sec untypeabletyped

unbound variable (line 33)
unbound: format_time — one of the package’s own names, itself untyped
error detail
name: format_time
gradual mode: typed
any
timing: 0.000 s
source
pretty_sec <- format_time$pretty_sec
R/xtime.R:33

pretty_dt untypeabletyped

unbound variable (line 48)
unbound: format_time — one of the package’s own names, itself untyped
error detail
name: format_time
gradual mode: typed
any
timing: 0.000 s
source
pretty_dt <- format_time$pretty_dt
R/xtime.R:48
R/time.R

format_time untypeabletimeout

unbound variable (line 11)
unbound: data.frame — a name the prelude does not declare
error detail
name: data.frame
gradual mode: timeout
timing: 12.77 s
source
format_time <- local({

  assert_diff_time <- function(x) {
    stopifnot(inherits(x, "difftime"))
  }

  parse_ms <- function(ms) {
    stopifnot(is.numeric(ms))

    data.frame(
      days = floor(ms / 86400000),
      hours = floor((ms / 3600000) %% 24),
      minutes = floor((ms / 60000) %% 60),
      seconds = round((ms / 1000) %% 60, 1)
    )
  }

  first_positive <- function(x) which(x > 0)[1]

  trim <- function (x) gsub("^\\s+|\\s+$", "", x)

  pretty_ms <- function(ms, compact = FALSE) {

    stopifnot(is.numeric(ms))

    parsed <- t(parse_ms(ms))

    if (compact) {
      units <- c("d", "h", "m", "s")
      parsed2 <- parsed
      parsed2[] <- paste0(parsed, units)
      idx <- cbind(
        apply(parsed, 2, first_positive),
        seq_len(length(ms))
      )
      tmp <- paste0("~", parsed2[idx])

      # handle NAs
      tmp[is.na(parsed2[idx])] <- NA_character_
      tmp

    } else {

      ## Exact for small ones
      exact            <- paste0(ceiling(ms), "ms")
      exact[is.na(ms)] <- NA_character_

      ## Approximate for others, in seconds
      merge_pieces <- function(pieces) {
        ## handle NAs
        if (all(is.na(pieces))) {
          return(NA_character_)
        }

        ## handle non-NAs
        paste0(
          if (pieces[1]) paste0(pieces[1], "d "),
          if (pieces[2]) paste0(pieces[2], "h "),
          if (pieces[3]) paste0(pieces[3], "m "),
          if (pieces[4]) paste0(pieces[4], "s ")
        )
      }
      approx <- trim(apply(parsed, 2, merge_pieces))

      ifelse(ms < 1000, exact, approx)
    }
  }

  pretty_sec <- function(sec, compact = FALSE) {
    pretty_ms(sec * 1000, compact = compact)
  }

  pretty_dt <- function(dt, compact = FALSE) {

    assert_diff_time(dt)

    units(dt) <- "secs"

    pretty_sec(as.vector(dt), compact = compact)
  }

  structure(
    list(
      .internal = environment(),
      pretty_ms = pretty_ms,
      pretty_sec = pretty_sec,
      pretty_dt = pretty_dt
    ),
    class = c("standalone_time", "standalone")
  )
})
R/time.R:2