php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #8703 incorrect example code for mktime
Submitted: 2001-01-14 20:59 UTC Modified: 2001-01-22 20:12 UTC
From: jbarrett at australink dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.3pl1 OS: Debian Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jbarrett at australink dot net
New email:
PHP Version: OS:

 

 [2001-01-14 20:59 UTC] jbarrett at australink dot net
Example 2 should read instead :-

$lastday = date("d", mktime (0,0,0,3,0,2000));
echo strftime ("Last day in Feb 2000 is: %d", $lastday);
     
$lastday = date("d", mktime (0,0,0,4,-31,2000));
echo strftime ("Last day in Feb 2000 is: %d", $lastday);

(Note if this has been changed in 4.0.4 to not require date ignore me :P i'm running on 4.0.3)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-22 20:12 UTC] jimw@php.net
looks like someone did this and forgot to close the bug.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 14:01:30 2025 UTC