Leap year gives me problem!

Calculating a monthly average and getting strange values 2024-02-29 00:00:00.

Trying this: If Day('*-1d') = 29 and Month('*-1mo') = 2 and Hour('*') >= 0 and Hour('*') < 6 then.....

It works from 01:00 but not between 00:00-01:00.

Why?