Doc #62548 [Ver->Csd]: 3rd Parameter in Date_Sunrise() and Date_Sunset() is incorrectly named.
| From: | cmb@php.net | Date: | Mon, 12 Feb 2018 22:22:41 +0000 |
| Subject: | Doc #62548 [Ver->Csd]: 3rd Parameter in Date_Sunrise() and Date_Sunset() is incorrectly named. | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15429@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62548&edit=1
ID: 62548
Updated by: cmb@php.net
Reported by: vascowhite at gmail dot com
Summary: 3rd Parameter in Date_Sunrise() and Date_Sunset() is
incorrectly named.
-Status: Verified
+Status: Closed
Type: Documentation Problem
Package: Date/time related
Operating System: N/A
PHP Version: 5.4.4
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Fixed via <http://svn.php.net/viewvc?view=revision&revision=344247>.
Previous Comments:
------------------------------------------------------------------------
[2018-02-08 16:51:32] cmb@php.net
> zenith:-
> This is the point on the celestial sphere directly above the
> observer's head and will have no bearing on the calculation
> whatsoever.
That's not correct here. zenith actually means the zenith angle,
which is important to calculate twilight times. See also
<https://web.archive.org/web/20161202180207/http://williams.best.vwh.net/sunrise_sunset_algorithm.htm>.
Obviously, the documentation should clarify this.
------------------------------------------------------------------------
[2012-07-20 02:29:34] aharvey@php.net
That is what the parameters are actually called in the source, so I'll punt this back to the
ext/date bug queue rather than documentation for now.
------------------------------------------------------------------------
[2012-07-13 12:20:17] vascowhite at gmail dot com
Description:
------------
See the documentation at http://us2.php.net/function.date-sunrise and at
http://us2.php.net/manual/en/function.date-sunset.php
zenith:-
This is the point on the celestial sphere directly above the observer's head and
will have no bearing on the calculation whatsoever. 'zenith = 90' makes no sense
at all.
The term you are looking for is 'azimuth', which is used in sunrise, sunset
calculations to tell if the bearing of the sun from the observer is East or West
of North.
Hence, the 3rd parameter in these functions should be 'azimuth' and not
'zenith'.
References:-
http://en.wikipedia.org/wiki/Zenith
http://en.wikipedia.org/wiki/Azimuth
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62548&edit=1