ym_get_wateryear function

Get the water year from a year-month (yearmon) value