Fix to make sure month and day are not factors (should not be necessary).
Also corrected leap-year date fix (was confusing days and hours).