php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53558 PHP manual; strftime: Example #3 is not location aware.
Submitted: 2010-12-16 16:06 UTC Modified: 2010-12-20 03:00 UTC
From: simon at stienen dot name Assigned: kalle (profile)
Status: Closed Package: Website problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: simon at stienen dot name
New email:
PHP Version: OS:

 

 [2010-12-16 16:06 UTC] simon at stienen dot name
Description:
------------
---
From manual page: http://www.php.net/function.strftime#Examples
---

A location aware replacement for Example #3:

<?php
$format = '%%e%%%e%%'; // Jan 1: results in: '%e%1%' (%%, e, %%, %e, %%)

if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
    $format = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $format);
}



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-20 03:00 UTC] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=306482
Log: Improved example #3 (%e modifier on Windows) - Patch by simon at stienen dot name (bug #53558)
 [2010-12-20 03:00 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2010-12-20 03:00 UTC] kalle@php.net
This bug has been fixed in SVN. Since the websites are not directly
updated from the SVN server, the fix might need some time to spread
across the globe to all mirror sites, including PHP.net itself.

Thank you for the report, and for helping us make PHP.net better.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 21 22:03:36 2021 UTC