php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #39355 README_UPDATE_5_2 incorrect DateTime API [patch]
Submitted: 2006-11-03 01:18 UTC Modified: 2006-11-03 10:59 UTC
From: akorthaus at web dot de Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
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: akorthaus at web dot de
New email:
PHP Version: OS:

 

 [2006-11-03 01:18 UTC] akorthaus at web dot de
Description:
------------
http://www.php.net/UPDATE_5_2.txt lists the DateTime API, which is not correct (looks like a procedural interface where the objects get passed as 1st parameter).

Patch against current PHP_5_2 branch:

Index: README.UPDATE_5_2
===================================================================
RCS file: /repository/php-src/Attic/README.UPDATE_5_2,v
retrieving revision 1.1.2.26
diff -u -r1.1.2.26 README.UPDATE_5_2
--- README.UPDATE_5_2   31 Oct 2006 17:24:51 -0000      1.1.2.26
+++ README.UPDATE_5_2   3 Nov 2006 01:13:39 -0000
@@ -541,34 +541,34 @@
     Methods:
       DateTime::__construct([string time[, DateTimeZone object]])
       - Returns new DateTime object
-      string DateTime::format(DateTime object, string format)
+      string DateTime::format(string format)
       - Returns date formatted according to given format
-      long DateTime::getOffset(DateTime object)
+      long DateTime::getOffset()
       - Returns the DST offset
-      DateTimeZone DateTime::getTimezone(DateTime object)
+      DateTimeZone DateTime::getTimezone()
       - Return new DateTimeZone object relative to give DateTime
-      void DateTime::modify(DateTime object, string modify)
+      void DateTime::modify(string modify)
       - Alters the timestamp
       array DateTime::parse(string date)
       - Returns associative array with detailed info about given date
-      void DateTime::setDate(DateTime object, long year, long month, long day)
+      void DateTime::setDate(long year, long month, long day)
       - Sets the date
-      void DateTime::setISODate(DateTime object, long year, long week[, long day])
+      void DateTime::setISODate(long year, long week[, long day])
       - Sets the ISO date
-      void DateTime::setTime(DateTime object, long hour, long minute[, long second])
+      void DateTime::setTime(long hour, long minute[, long second])
       - Sets the time
-      void DateTime::setTimezone(DateTime object, DateTimeZone object)
+      void DateTime::setTimezone(DateTimeZone object)
       - Sets the timezone for the DateTime object

   DateTimeZone:
     Methods:
       DateTimeZone DateTimeZone::__construct(string timezone)
       - Returns new DateTimeZone object
-      string DateTimeZone::getName(DateTimeZone object)
+      string DateTimeZone::getName()
       - Returns the name of the timezone
-      long DateTimeZone::getOffset(DateTimeZone object, DateTime object)
+      long DateTimeZone::getOffset(DateTime object)
       - Returns the timezone offset
-      array DateTimeZone::getTransitions(DateTimeZone object)
+      array DateTimeZone::getTransitions()
       - Returns numerically indexed array containing associative array for all transitions for the timezone

   RecursiveRegexIterator:



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-03 01:20 UTC] akorthaus at web dot de
nt
 [2006-11-03 07:28 UTC] derick@php.net
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.
 [2006-11-03 10:55 UTC] akorthaus at web dot de
Will http://www.php.net/UPDATE_5_2.txt be updated automatically, too?
 [2006-11-03 10:59 UTC] derick@php.net
Not automatically, but I committed the change there as well.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri May 08 08:00:02 2026 UTC