mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-13 20:58:16 +03:00
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.
This commit is contained in:
parent
39f10232b5
commit
e3f1c7f751
6
xmlschemastypes.c
Normal file → Executable file
6
xmlschemastypes.c
Normal file → Executable file
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user