Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
>> What do you think about just adding
>>
>> case DCH_MONTH:
>> + if (!tm->tm_mon)
>> + return 0;
>> and similarly in each of the other case arms that use tm_mon?
> Yes, I think you're right. It's because original code was for non-
> interval 'tm' struct where is no problem with zeros.
OK, patch applied. (I had it wrong above, correct return value is -1.)
regards, tom lane