From 4ecd1f367b364f0b1e13f642accfbc3ff69a381b Mon Sep 17 00:00:00 2001 From: Malcolm Barrett Date: Thu, 15 Dec 2022 13:57:01 -0500 Subject: [PATCH] use explicit integers --- R/accessors-month.r | 2 +- R/accessors-year.r | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/accessors-month.r b/R/accessors-month.r index 24c4a15e..603ba0a6 100644 --- a/R/accessors-month.r +++ b/R/accessors-month.r @@ -35,7 +35,7 @@ month <- function(x, label = FALSE, abbr = TRUE, locale = Sys.getlocale("LC_TIME #' @export month.default <- function(x, label = FALSE, abbr = TRUE, locale = Sys.getlocale("LC_TIME")) { - month(as.POSIXlt(x, tz = tz(x))$mon + 1, label, abbr, locale = locale) + month(as.POSIXlt(x, tz = tz(x))$mon + 1L, label, abbr, locale = locale) } #' @export diff --git a/R/accessors-year.r b/R/accessors-year.r index 2a8b9b03..404d69fc 100644 --- a/R/accessors-year.r +++ b/R/accessors-year.r @@ -26,7 +26,7 @@ year <- function(x) { #' @export year.default <- function(x) { - as.POSIXlt(x, tz = tz(x))$year + 1900 + as.POSIXlt(x, tz = tz(x))$year + 1900L } #' @export