: Chad Day
Cc: php general
Subject: Re: [PHP] Finding # of weekdays between 2 dates..
WFM:
$nowdate = mktime(0, 0, 0, 4, 1, 2002);
$futuredate = mktime(0, 0, 0, 5, 2, 2002);
echo weekdaysBetween ($nowdate,$futuredate,2);
I get 5
Chad Day wrote:
>I found this function in the list archives wh
WFM:
$nowdate = mktime(0, 0, 0, 4, 1, 2002);
$futuredate = mktime(0, 0, 0, 5, 2, 2002);
echo weekdaysBetween ($nowdate,$futuredate,2);
I get 5
Chad Day wrote:
I found this function in the list archives while searching on how to find
the number of a weekday (say, Tuesdays) between 2 dates..
I found this function in the list archives while searching on how to find
the number of a weekday (say, Tuesdays) between 2 dates..
function weekdaysBetween ($timestamp1, $timestamp2, $weekday)
{
return floor(intval(($timestamp2 - $timestamp1) / 86400) / 7)
+ ((date('w', $timestamp1)
3 matches
Mail list logo