php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76401 DateTime: constants moved into DateTimeInterface
Submitted: 2018-06-01 09:19 UTC Modified: 2020-09-18 15:06 UTC
From: salsi at icosaedro dot it Assigned: cmb (profile)
Status: Closed Package: Date/time related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: salsi at icosaedro dot it
New email:
PHP Version: OS:

 

 [2018-06-01 09:19 UTC] salsi at icosaedro dot it
Description:
------------
Since PHP 7.2.0 constants that where defined in DateTime moved to DateTimeInterface, see FR #71520 and PHP 7.2.0 ChangeLog:

$ php -r "echo PHP_VERSION;"
7.2.4

$ php -r "ReflectionClass::export('DateTimeInterface');"
Interface [ <internal:date> interface DateTimeInterface ] {

  - Constants [13] {
    Constant [ public string ATOM ] { Y-m-d\TH:i:sP }
    Constant [ public string COOKIE ] { l, d-M-Y H:i:s T }
    Constant [ public string ISO8601 ] { Y-m-d\TH:i:sO }
    Constant [ public string RFC822 ] { D, d M y H:i:s O }
    Constant [ public string RFC850 ] { l, d-M-y H:i:s T }
    Constant [ public string RFC1036 ] { D, d M y H:i:s O }
    Constant [ public string RFC1123 ] { D, d M Y H:i:s O }
    Constant [ public string RFC7231 ] { D, d M Y H:i:s \G\M\T }
    Constant [ public string RFC2822 ] { D, d M Y H:i:s O }
    Constant [ public string RFC3339 ] { Y-m-d\TH:i:sP }
    Constant [ public string RFC3339_EXTENDED ] { Y-m-d\TH:i:s.vP }
    Constant [ public string RSS ] { D, d M Y H:i:s O }
    Constant [ public string W3C ] { Y-m-d\TH:i:sP }
  }
...


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-01 21:52 UTC] cmb@php.net
-Status: Open +Status: Verified -Package: Documentation problem +Package: Date/time related
 [2018-06-01 21:52 UTC] cmb@php.net
Thanks!  See also <https://github.com/php/php-src/commit/637714c>.
 [2020-09-18 15:06 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 12:01:31 2024 UTC