R/f_intMonths.R

Defines functions f_intMonths

Documented in f_intMonths

#' Compute the months between two purchase dates
#'
#' @param a starting date
#' @param b ending date
#'
#' Description here
f_intMonths = function(a, b) {
  i <- lubridate::interval(a,b) %/% months(1)
  return(i + 1)}

Try the CADF package in your browser

Any scripts or data that you put into this service are public.

CADF documentation built on Oct. 31, 2024, 5:08 p.m.