Date/Calc.php
| From: | Simon H | Date: | Fri, 08 Feb 2002 15:13:28 +0000 |
| Subject: | Date/Calc.php | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-4502@lists.php.net to get a copy of this message | ||
I had this in the General list, but figured I might get a better response
from the author here.
I was wondering if anyone could explain how I can use the "getMonthFullname"
function, and how to use the Date_calc Class in general. Are there any docs
or examples?
I'm trying to use the above-mentioned function to populate a pulldown like
below, but the result I'm getting currently is:
<SELECT NAME="TrialStart_month"><option value="1"></option>
The code: (Part of a function that includes DAY and YEAR as well, but just
in numbers)
-----------------
if (isset($select_name_month))
{
echo '<SELECT NAME="' .$select_name_month . '">';
for ($i=1; $i<=12; $i++)
{
echo '<option value="' . $i . '"';
if (isset($month) && $month == $i)
{
echo ' SELECTED';
}
echo '>';
require "Date/Calc.php";
$D_Calc . $i = new Date_Calc;
echo $D_Calc . $i->getMonthFullname($i);
echo ' </option>';
}
echo '</SELECT> ';
}
-----------------
Any help would much appreciated....I've only just discovered this class, and
I can see it will come in useful!
Thanks
Simon H