Robert Cummings wrote:
function getStamp($dateStr,$dayVal=1){
   return date('U',mktime(0,0,0, $dateStr,$dayVal,date('Y')));
}
                                                    ^^^^^^^^^
                                                    ^^^^^^^^^
                                                    ^^^^^^^^^
Similarly.

Cheers,
Rob.

Hi Rob,

Changing:
function setCal($h=0,$m=0,$s=0,$offset,$dayVal=1){              
   $stamp = date('U',mktime($h,$m,$s, $offset,$dayVal,date('Y')));

To:
function setCal($h=0,$m=0,$s=0,$offset,$dayVal=1){
  if (date('Y') > date('Y',date('U',mktime($h,$m,$s,
     $offset,$dayVal,date('Y')))))
  {
     $stamp = date('U',mktime($h,$m,$s, $offset,$dayVal,date('Y')+1));
  }
  else
  {
     $stamp = date('U',mktime($h,$m,$s, $offset,$dayVal,date('Y')));
  }

Makes no change. Strange condition still exists. I was rather hoping
that if "date('U',mktime($h,$m,$s, $offset,$dayVal,date('Y')))"
is smart enough to know to increase or decrease the month value that it
would do the same to the year value accordingly.

$offset contain either date('n',$timestamp)-1  or  date('n',$timestamp)+1

The $timestamp value comes from the array being stored in the
$_SESSION['calendar'] as either 'current', 'prev', or 'next'.

--

Mark
-------------------------
the rule of law is good, however the rule of tyrants just plain sucks!
Real Tax Reform begins with getting rid of the IRS.
==============================================
Powered by CentOS5 (RHEL5)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to