For users
apply_ufunc
For developers/contributors
Community
DataArray.dt.daysinmonth
The number of days in the month