Fix evaluation of month ranges spanning the year boundary
We have similar lookback code for time ranges spanning midnight as well, the same is needed here.
We have similar lookback code for time ranges spanning midnight as well, the same is needed here.