Attaches fields for the year, month, day and water year to a data frame with a POSIX time field. Fields will be named calendar_year, calendar_month, calendar_day, and water_year.

attach_water_year_data(timeseries, date_field = "posix_time")

Arguments

timeseries.

A timeseries data frame with a date field

date_field.

A sortable field of date/time information - a good choice would be a field created by strptime or any other POSIX format time.