diff options
author | Derick Rethans <derick@php.net> | 2005-06-15 11:01:07 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2005-06-15 11:01:07 +0000 |
commit | eb8b4fd4a18bdd513851f2d9514521906aededcc (patch) | |
tree | 09576fd2a6c3caa123e57b04776ea49295a050de /ext/date/lib/dow.c | |
parent | 55b0a90e91566cf30a6c606ffb51bdd62599794d (diff) | |
download | php-git-eb8b4fd4a18bdd513851f2d9514521906aededcc.tar.gz |
- Make it compile cleanly with MS VC++ too, which is completely anal in some
cases.
Diffstat (limited to 'ext/date/lib/dow.c')
-rw-r--r-- | ext/date/lib/dow.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/date/lib/dow.c b/ext/date/lib/dow.c index f0f08ad04b..4066d61b4c 100644 --- a/ext/date/lib/dow.c +++ b/ext/date/lib/dow.c @@ -23,17 +23,17 @@ static int m_table_common[13] = { -1, 0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 }; /* 1 = jan */ static int m_table_leap[13] = { -1, 6, 2, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 }; /* 1 = jan */ -static int century_value(int j) +static timelib_sll century_value(timelib_sll j) { - int i = j - 17; - int c = (4 - i * 2 + (i + 1) / 4) % 7; + timelib_sll i = j - 17; + timelib_sll c = (4 - i * 2 + (i + 1) / 4) % 7; return c < 0 ? c + 7 : c; } -int timelib_day_of_week(int y, int m, int d) +timelib_sll timelib_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d) { - int c1, y1, m1; + timelib_sll c1, y1, m1; /* Only valid for Gregorian calendar */ if (y < 1753) { @@ -45,9 +45,9 @@ int timelib_day_of_week(int y, int m, int d) return (c1 + y1 + m1 + (y1 / 4) + d) % 7; } -int timelib_daynr_from_weeknr(int y, int w, int d) +timelib_sll timelib_daynr_from_weeknr(timelib_sll y, timelib_sll w, timelib_sll d) { - int dow, day; + timelib_sll dow, day; /* Figure out the dayofweek for y-1-1 */ dow = timelib_day_of_week(y, 1, 1); |