R/getPeriod.R

Defines functions getPeriod

Documented in getPeriod

#' getPeriod
#'
#' This function converts a date to period in yyyymm format.
#' @param date
#'
#'
#'
#' @return
#' @export
#'
#' @examples
getPeriod <- function(date) {
  paste0(lubridate::year(date),
         formatC(lubridate::month(date), width = 2, flag = '0'))
}
jimmyg3g/myfirstpackage documentation built on Nov. 16, 2020, 1:43 p.m.