Commit e3f1c7f7 authored by Nick Wellnhofer's avatar Nick Wellnhofer

Partial fix for comparison of xs:durations

See https://bugzilla.gnome.org/show_bug.cgi?id=777139

Thanks to Zhongyuan Zhou for the initial merge request !34.
parent 39f10232
......@@ -3628,8 +3628,10 @@ xmlSchemaCompareDurations(xmlSchemaValPtr x, xmlSchemaValPtr y)
minday = 0;
maxday = 0;
} else {
maxday = 366 * ((myear + 3) / 4) +
365 * ((myear - 1) % 4);
/* FIXME: This doesn't take leap year exceptions every 100/400 years
into account. */
maxday = 365 * myear + (myear + 3) / 4;
/* FIXME: Needs to be calculated separately */
minday = maxday - 1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment