R/wp_yearmonth.R

Defines functions wp_yearmonth

Documented in wp_yearmonth

#' function for getting year and month of a timestamp
#' 
#' @param timestamp Some sort of timestamp e.g. of class POSIXlt, POSIXct, Date,
#'   or character. If the option is of type character it should be in the form
#'   of yyyy-mm-dd.

wp_yearmonth <- function(timestamp){
  paste0(
    wp_year(timestamp), 
    stringr::str_pad(wp_month(timestamp), 2, "left", 0)
  )
}
johndharrison/wikipediatrend documentation built on May 19, 2019, 5:14 p.m.