easysnowdata.utils.datetime_to_WY#
- easysnowdata.utils.datetime_to_WY(date: Timestamp | str, hemisphere: str = 'northern') int | float[source]#
Convert a date to its water year (WY).
Scalar wrapper around the vectorized
easysnowdata.processing.wateryear.water_year(); returnsnp.nanwhen date cannot be parsed. For the northern hemisphere the water year is the calendar year in which it ends (WY 2021 runs 2020-10-01 – 2021-09-30).