php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #70534 See Also suggestion: sprintf, date
Submitted: 2015-09-20 11:03 UTC Modified: 2016-06-21 21:21 UTC
From: ravenswd at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Unknown/Other Function
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2015-09-20 11:03 UTC] ravenswd at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.sprintf
---
On the sprintf page, the "See Also" section should include a link to the "date" function, since that also deals with formatting output. Similarly, the See Also on date should link to sprintf.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-20 11:11 UTC] requinix@php.net
How does date() help me work with formatting strings and numbers? How does sprintf() help me work with dates? I think this would be more misleading and confusing than anything.
 [2015-09-20 11:39 UTC] ravenswd at gmail dot com
Q: How does sprintf() help me work with dates?

A: From the sprintf page itself:

Example #9 sprintf(): zero-padded integers
<?php
$isodate = sprintf("%04d-%02d-%02d", $year, $month, $day);
?>
 [2016-06-21 21:15 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2016-06-21 21:15 UTC] cmb@php.net
I agree to what requinix said, but the sprintf() man page already
lists number_format(), so I think that adding date() is
acceptable. Adding a link from date() to sprintf(), however,
appears to be rather pointless.
 [2016-06-21 21:20 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=339444
Log: Fix #70534: See Also suggestion: sprintf, date
 [2016-06-21 21:21 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2016-06-21 21:21 UTC] cmb@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.
 [2020-02-07 06:07 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=ec67e42ba8860cf21fb00437cebbc6cf309e7b5d
Log: Fix #70534: See Also suggestion: sprintf, date
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Sep 23 03:01:23 2020 UTC