R/year_month.R

#' Year-Month Date Format
#'
#' @param date
#'
#' @return
#' @export
#'
#' @examples
#' ym("2018-01-01")

ym_txt <- function(date) {

    paste0(lubridate::year(date), "-", lubridate::month(date, label = TRUE))

}


#' Month-Year Date Format
#'
#' @param date
#'
#' @return
#' @export
#'
#' @examples
#' my("2018-01-01")

my_txt <- function(date) {

    paste0(lubridate::month(date, label = TRUE), "-", lubridate::year(date))

}
aamangold/aamhelpers documentation built on June 3, 2019, 11:06 p.m.