#' Convert departure date and other date as weeks to departure
#'
#' This function converts vectors of departure dates and dates into numeric vector representing weeks to departure.
#'
#' @param departureDate A character vector of departure dates. Must be in [DD/MM/YYYY HH:MM] form.
#' @param date A character vector of given dates. Must be in [DD/MM/YYYY HH:MM] form.
#' @return A numeric vector of weeks to departure.
#' @export
convert_departureDate_plus_otherDate_asWeeksToDeparture = function(departureDate, date){
departureDate = convert_datetime_into_date(departureDate)
date = convert_datetime_into_date(date)
o = as.numeric(departureDate-date)%/%7
return(o)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.