Derive water year value for a date

water_year(date, start_month = 10)

Arguments

date the (vector of) dates for which the water year will be calculated the month in which the water year starts, default is October

Value

The water year value

Examples

water_year(as.Date(c("2010-11-03", "2013-02-03")))
#> [1] 2010 2012