Closed rabutler closed 7 years ago
New function:
getWYFromYearMon <- function(xx) { mm <- as.numeric(format(xx, '%m')) yy <- as.numeric(format(xx, '%Y')) # if OND then increase year by one for water year, else leave it the same yy[mm > 9] <- yy[mm > 9] + 1 yy }
if xx is supposed to be yearmon, then check to make sure it is a yearmon first
New function: