R/monthsInt.R

Defines functions monthsInt

Documented in monthsInt

#' Month Number
#'
#' Extract month number from a date object.
#'
#' @param x a vector of dates, of class \code{Date} or \code{POSIXt}.
#'
#' @return Vector of months as integers.
#'
#' @note Use \code{months} to extract month name instead.
#'
#' @export

monthsInt <- function(x)
{
  as.integer(format(x, "%m"))
}
arnima-github/arni documentation built on Oct. 28, 2023, 6:18 p.m.