Patch pre_1600_day_of_week_fix for Date/time related Bug #63391
Patch version 2013-11-28 06:21 UTC
Return to Bug #63391 |
Download this patch
Patch Revisions:
Developer: tcarter@noggin.com.au
Index: ext/date/lib/dow.c
===================================================================
--- ext/date/lib/dow.c (revision 328126)
+++ ext/date/lib/dow.c (working copy)
@@ -25,10 +25,7 @@
static timelib_sll century_value(timelib_sll j)
{
- timelib_sll i = j - 17;
- timelib_sll c = (4 - i * 2 + (i + 1) / 4) % 7;
-
- return c < 0 ? c + 7 : c;
+ return 6 - (j%4)*2;
}
static timelib_sll timelib_day_of_week_ex(timelib_sll y, timelib_sll m, timelib_sll d, int iso)
|