note 45443 modified in function.jddayofweek by didou
| From: | didou@php.net | Date: | Mon, 10 Jan 2005 01:06:37 +0000 |
| Subject: | note 45443 modified in function.jddayofweek by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-83015@lists.php.net to get a copy of this message | ||
Be aware that date() and mktime() only work as long as you move within the UNIX era (1970 - 2038 /
0x0 - 0x7FFFFFFF in seconds). Outside that era those functions are only generating errors.
In other words: mktime(0, 0, 0, 12, 31, 1969) *DOES NOT* work (and so doesn't date() fed with
with mktime()'s result from above). But cal_to_jd(CAL_GREGORIAN, 12, 11, 1969) *DOES WORK*.
And please note that the calendar-extension's functions arguments follow the US date order:
month - day - year.
--was--
The function works perfectly!
"spam at doofer dot org" contributed a code snippet on 01-Sep-2004 09:41 where s/he used
GregorianToJD(day, month, year) instead of GregorianToJD(month, day, year).
Of course, confusing month and year generates garbage and code snippets like that are
counterproductive.
I'd like you to delete that entry.
BTW: I do not understand how that entry could find its way into the manual.
Furthermore I'd like you to delete "nobody at anywhere dot com"'s contribution
dated 10-Mar-2003 11:07 saying: 'This is probably why the jddayofweek() function no longer
works.'
That statement is wrong as well.
NOW HERE COMES MY CONTRIBUTION:
Be aware that date() and mktime() only work as long as you move within the UNIX era (1970 - 2038 /
0x0 - 0x7FFFFFFF in seconds). Outside that era those functions are only generating errors.
In other words: mktime(0, 0, 0, 12, 31, 1969) *DOES NOT* work (and so doesn't date() fed with
with mktime()'s result from above). But cal_to_jd(CAL_GREGORIAN, 12, 11, 1969) *DOES WORK*.
And please note that the calendar-extension's functions arguments follow the US date order:
month - day - year.
http://php.net/manual/en/function.jddayofweek.php