Decimal water year from a date field

decimal.WY(date, WY.type = "FL")

Arguments

date

Date in as.POSIXct or as.Date format

WY.type

Specifies Federal ("Fed") or Florida ("FL") water years

Value

Returns decimal water year value based on Federal (Starts Oct 1) or Florida (Starts May 1),

Examples

# Decimal Water Year
decimal.WY(as.Date("2001-05-01"));
#> [1] 2002