note 45443 added to function.jddayofweek

From: Date: Tue, 07 Sep 2004 15:28:57 +0000
Subject: note 45443 added to function.jddayofweek
Groups: php.notes 
Request: Send a blank email to php-notes+get-76154@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.jddayofweek.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45443 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45443&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45443&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76154) next »