|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPatch668899 (last revision 2014-03-13 14:03 UTC by evazzoler at gmail dot com)Pull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2014-04-20 22:08 UTC] stas@php.net
-Package: *General Issues
+Package: Date/time related
[2014-06-08 23:37 UTC] stas@php.net
-Status: Open
+Status: Not a bug
[2014-06-08 23:37 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 16:00:02 2025 UTC |
Description: ------------ I can't find a detail on how to intend some "quantities". When I "diff" two dates, and the function returns i.e. "1 month" and "1 day", what does it means with "1 month"? How many days has one month? Is it a variable quantity depending on the specific month we consider, or should I assume a "standard"/"normalized"/"conventional" quantity of 30 days? Is it managed? A month "concept" in a difference cannot have identity (how can I say we're speaking about february when I diff two dates?) So, because I have to calculate it with precision, how do I have to consider "1 month"? The result could be: 28+1=29 days 29+1=30 days 30+1=31 days 31+1=32 days 3 days of error are not acceptable, I suppose somebody gave to this a sense. You could suggest to me to use "getTimestamp" but passing trough epoch time causes errors for dates before 1970 and after 2038... The same for "year" concept: 365 or 366 days??? This info I'm requesting should be on top of the documentation page!!!!! Please, fix it! Test script: --------------- {just read the doc} Expected result: ---------------- {just modify the doc} Actual result: -------------- {incomplete doc}