date_to_wyd: date to water-year day conversion

View source: R/date_to_wyd.R

date_to_wydR Documentation

date to water-year day conversion

Description

Converts a date (inputs of year, calendar-year day) to water-year day

Usage

date_to_wyd(cy, cyd, wyd_start = 274)

Arguments

cy

Calendar year

cyd

Calendar-year day. January 1 is equal to 1. Can be obtained from date_to_cyd function.

wyd_start

Calendar-year day to start water-year day (Default 274 is October 1)

Note

Accounts for leap years (but not the skipping of leap years at every century except those divisible by 400 (e.g. year 2000))

Tip: Function requires purrr:pmap_dbl or mapply

purrr::pmap_dbl(list(cy, cyd, wyd_start=274), date_to_wyd)

mapply(date_to_wyd, cy, cyd, wyd_start)

Author(s)

Ryan Bart


ryanrbart/EcoHydroConversions documentation built on Feb. 13, 2023, 11:17 p.m.