From: William M. Brack Date: Tue, 4 Oct 2005 12:37:43 +0000 (+0000) Subject: applied fix to date:week-in-year posted to the mailing list by Thomas X-Git-Tag: v1.1.28~280 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac06b251096ce7e644eb50664fc67f48e4487e25;p=platform%2Fupstream%2Flibxslt.git applied fix to date:week-in-year posted to the mailing list by Thomas * libexslt/date.c: applied fix to date:week-in-year posted to the mailing list by Thomas Broyer * tests/exslt/date/date.1.out, tests/exslt/date/datetime.1.out: updated to reflect above fix --- diff --git a/ChangeLog b/ChangeLog index 2f5c88e..a19ae5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Oct 4 20:37:09 HKT 2005 William Brack + + * libexslt/date.c: applied fix to date:week-in-year posted to + the mailing list by Thomas Broyer + * tests/exslt/date/date.1.out, tests/exslt/date/datetime.1.out: + updated to reflect above fix + Sun Oct 2 11:52:44 CEST 2005 Daniel Veillard * configure.in libxslt/Makefile.am libxslt/xsltconfig.h.in diff --git a/libexslt/date.c b/libexslt/date.c index 641fde3..2558e47 100644 --- a/libexslt/date.c +++ b/libexslt/date.c @@ -2141,8 +2141,8 @@ exsltDateWeekInYear (const xmlChar *dateTime) */ fdiw = (_exsltDateDayInWeek(fdiy, dt->value.date.year) + 6) % 7; - ret = DAY_IN_YEAR(dt->value.date.day, dt->value.date.mon, - dt->value.date.year) / 7; + ret = (DAY_IN_YEAR(dt->value.date.day, dt->value.date.mon, + dt->value.date.year) + fdiw) / 7; /* ISO 8601 adjustment, 3 is Thu */ if (fdiw <= 3) diff --git a/tests/exslt/date/date.1.out b/tests/exslt/date/date.1.out index 2d3eb61..d301e02 100644 --- a/tests/exslt/date/date.1.out +++ b/tests/exslt/date/date.1.out @@ -43,7 +43,7 @@ month-in-year : 2 month-name : February month-abbreviation : Feb - week-in-year : 8 + week-in-year : 9 day-in-year : 60 day-in-month : 29 day-of-week-in-month : 5 @@ -79,7 +79,7 @@ month-in-year : 2 month-name : February month-abbreviation : Feb - week-in-year : 9 + week-in-year : 10 day-in-year : 60 day-in-month : 29 day-of-week-in-month : 5 diff --git a/tests/exslt/date/datetime.1.out b/tests/exslt/date/datetime.1.out index ca0996c..2eadb08 100644 --- a/tests/exslt/date/datetime.1.out +++ b/tests/exslt/date/datetime.1.out @@ -43,7 +43,7 @@ month-in-year : 12 month-name : December month-abbreviation : Dec - week-in-year : 52 + week-in-year : 53 day-in-year : 365 day-in-month : 31 day-of-week-in-month : 5 @@ -61,7 +61,7 @@ month-in-year : 12 month-name : December month-abbreviation : Dec - week-in-year : 52 + week-in-year : 53 day-in-year : 366 day-in-month : 31 day-of-week-in-month : 5