R/date.to.week.R

date.to.week <-
function(date) {
  if (as.numeric(format(date+3, "%U")) == 0) {
    Recall(date-1)
  } else {
    format(date+3, "%YW%U")
  }
}

Try the RTConnect package in your browser

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

RTConnect documentation built on May 2, 2019, 1:43 p.m.