R/H-nextMonthNumber.R

Defines functions nextMonthNumber

nextMonthNumber <- function(dateObject){
  ifelse(as.character(lubridate::month(dateObject))=="12"
         ,"01"
         ,ifelse(
           lubridate::month(dateObject)+1 < 10
           ,paste0("0",as.character(lubridate::month(dateObject)+1))
           ,as.character(lubridate::month(dateObject)+1)
         )
  )
}
erolbicero/tsconv documentation built on May 13, 2017, 8:23 p.m.