summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2004-11-08 03:41:26 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2004-11-08 03:41:26 +0000
commit01d362a38d6292e328253b0a7df2cb35a7e9d433 (patch)
treee16af21fd6a70cbad679ba5afd82d5906e8ecdd0
parent980a02c4f73d777b283a3277bd7b2b720ca71f90 (diff)
downloadlibxslt-01d362a38d6292e328253b0a7df2cb35a7e9d433.tar.gz
libxslt-01d362a38d6292e328253b0a7df2cb35a7e9d433.tar.bz2
libxslt-01d362a38d6292e328253b0a7df2cb35a7e9d433.zip
fixed problem with day-of-week-in-month (bug 157592) with patch from Sal
* libexslt/date.c: fixed problem with day-of-week-in-month (bug 157592) with patch from Sal Paradise * tests/exslt/date/datetime.1.out: corrected expected output after above fix
-rw-r--r--ChangeLog7
-rw-r--r--libexslt/date.c4
-rw-r--r--tests/exslt/date/datetime.1.out2
3 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ece0fbb6..6fc464a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Nov 8 11:41:32 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * libexslt/date.c: fixed problem with day-of-week-in-month
+ (bug 157592) with patch from Sal Paradise
+ * tests/exslt/date/datetime.1.out: corrected expected output
+ after above fix
+
Mon Nov 1 15:57:24 CET 2004 Daniel Veillard <daniel@veillard.com>
* tests/general/bug-155.*, tests/general/Makefile.am,
diff --git a/libexslt/date.c b/libexslt/date.c
index 1f4cc254..641fde35 100644
--- a/libexslt/date.c
+++ b/libexslt/date.c
@@ -2203,7 +2203,7 @@ exsltDateWeekInMonth (const xmlChar *dateTime)
*/
fdiw = (_exsltDateDayInWeek(fdiy, dt->value.date.year) + 6) % 7;
- ret = ((dt->value.date.day + fdiw) / 7) + 1;
+ ret = ((dt->value.date.day + fdiw - 1) / 7) + 1;
exsltDateFreeDate(dt);
@@ -2348,7 +2348,7 @@ exsltDateDayOfWeekInMonth (const xmlChar *dateTime)
}
}
- ret = (dt->value.date.day / 7) + 1;
+ ret = ((dt->value.date.day -1) / 7) + 1;
exsltDateFreeDate(dt);
diff --git a/tests/exslt/date/datetime.1.out b/tests/exslt/date/datetime.1.out
index 7ea9826b..ca0996ca 100644
--- a/tests/exslt/date/datetime.1.out
+++ b/tests/exslt/date/datetime.1.out
@@ -10,7 +10,7 @@
week-in-year : 9
day-in-year : 59
day-in-month : 28
- day-of-week-in-month : 5
+ day-of-week-in-month : 4
day-in-week : 4
day-name : Wednesday
day-abbreviation : Wed