Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | date_validation.patch | 526 bytes | arlinsandbulte |
Comments
Comment #1
arlinsandbulte CreditAttribution: arlinsandbulte commentedFor the 6.x-2.x-dev version as of 2010-May-01. This error appears to be on line 1382.
Comment #2
arlinsandbulte CreditAttribution: arlinsandbulte commentedHere is a patch for the above error.
I have not tested it yet. Just following the suggestion of refman1073...
Comment #3
arlinsandbulte CreditAttribution: arlinsandbulte commentedThis patch looks correct to me.
I will review the D7 code and commit this when I get the chance.
Comment #4
arlinsandbulte CreditAttribution: arlinsandbulte commentedhttp://drupalcode.org/project/date.git/commit/ae5d99f