The date_is_valid function in date_api.module has a bug when checking invalid days. I believe the bug to be in line 1374 where the statement:

elseif (!date_valid_year($year) || !date_valid_month($month) || date_valid_day($day, $month, $year)) {

should be ... || !date_valid_day(...
Note the negation.

CommentFileSizeAuthor
#2 date_validation.patch526 bytesarlinsandbulte
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arlinsandbulte’s picture

For the 6.x-2.x-dev version as of 2010-May-01. This error appears to be on line 1382.

arlinsandbulte’s picture

Version: 6.x-2.2 » 6.x-2.x-dev
Status: Active » Needs review
FileSize
526 bytes

Here is a patch for the above error.
I have not tested it yet. Just following the suggestion of refman1073...

arlinsandbulte’s picture

Assigned: Unassigned » arlinsandbulte
Status: Needs review » Reviewed & tested by the community

This patch looks correct to me.
I will review the D7 code and commit this when I get the chance.

arlinsandbulte’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.