As I see it, this function should default to zero for the
first 3 arguments but one for the next two.
It makes sense to talk about the 0th hour of the day
(midnight) or the 0th minute of the hour or the 0th second
of the minute, but it makes no sense to talk about the 0th
day of the month or the 0th month of the year.
The example of why this change should happen is below:
<select id="month" name="month">
<?php
for ($i = 1; $i <= 12; $i++)
echo '<option
value="'.$i.'">'.date('F',mktime(0,0,0,$i)).'&l
t;/option>';
?>
</select>
Produces a list of meaningless months. To make it useful,
you have to add an extra argument to mktime.
<?php
mktime(0,0,0,$i,1)
?>
----
Server IP: 85.116.0.130
Probable Submitter: 195.248.103.49
----
Manual Page -- http
://www.php.net/manual/en/function.mktime.php
Edit -- https://master
.php.net/note/edit/70838
Del: integrated -- h
ttps://master.php.net/note/delete/70838/integrated
Del: useless -- http
s://master.php.net/note/delete/70838/useless
Del: bad code -- htt
ps://master.php.net/note/delete/70838/bad+code
Del: spam -- https:/
/master.php.net/note/delete/70838/spam
Del: non-english --
https://master.php.net/note/delete/70838/non-english
Del: in docs -- http
s://master.php.net/note/delete/70838/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/70838
Reject -- https://mast
er.php.net/note/reject/70838
Search -- https://
master.php.net/manage/user-notes.php
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|