Fix days of month calculation.