applied fix to date:week-in-year posted to the mailing list by Thomas
authorWilliam M. Brack <wbrack@src.gnome.org>
Tue, 4 Oct 2005 12:37:43 +0000 (12:37 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Tue, 4 Oct 2005 12:37:43 +0000 (12:37 +0000)
* 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

ChangeLog
libexslt/date.c
tests/exslt/date/date.1.out
tests/exslt/date/datetime.1.out

index 2f5c88e..a19ae5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Tue Oct  4 20:37:09 HKT 2005 William Brack <wbrack@mmm.com.hk>
+
+       * 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 <daniel@veillard.com>
 
        * configure.in libxslt/Makefile.am libxslt/xsltconfig.h.in
index 641fde3..2558e47 100644 (file)
@@ -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)
index 2d3eb61..d301e02 100644 (file)
@@ -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
index ca0996c..2eadb08 100644 (file)
@@ -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