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
 [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

Pull Requests

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: Mon Dec 09 01:01:27 2024 UTC