Doc #65762 [Opn->Csd]: Example citing use of constant is slightly inaccurate

From: Date: Wed, 25 Sep 2013 22:34:02 +0000
Subject: Doc #65762 [Opn->Csd]: Example citing use of constant is slightly inaccurate
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10308@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65762&edit=1

 ID:                 65762
 Updated by:         aharvey@php.net
 Reported by:        ben at indietorrent dot org
 Summary:            Example citing use of constant is slightly
                     inaccurate
-Status:             Open
+Status:             Closed
 Type:               Documentation Problem
 Package:            Documentation problem
 Operating System:   Windows
 PHP Version:        5.4.20
-Assigned To:        
+Assigned To:        aharvey
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.




Previous Comments:
------------------------------------------------------------------------
[2013-09-25 22:33:53] aharvey@php.net

Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=331494
Log: Fix incorrect date() example.

Fixes doc bug #65762 (Example citing use of constant is slightly inaccurate).

------------------------------------------------------------------------
[2013-09-25 22:13:35] ben at indietorrent dot org

Not to nitpick, but the example is incorrect in another way: it 
demonstrates the use of DATE_RFC822, but the sample output is actually from 
DATE_RFC2822. The former includes a two-digit years, whereas the latter includes a 
four-digit year.

------------------------------------------------------------------------
[2013-09-25 22:07:33] ben at indietorrent dot org

Description:
------------
---
From manual page: http://www.php.net/function.date
---

The example that demonstrates the use of a constant appears to be inaccurate:

<?php
/* use the constants in the format parameter */
// prints something like: Mon, 15 Aug 2005 15:12:46 UTC
echo date(DATE_RFC822);
?>

This actually prints something like the following:

Wed, 25 Sep 13 17:56:44 -0400

(notice that the last segment is the timezone *offset*, not the timezone 
abbreviation, as the comment in the example states).

However, the manual entry is correct (only the example is incorrect).



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=65762&edit=1


Thread (3 messages)

« previous php.doc.bugs (#10308) next »