Bug->Doc #62548 [Opn->Ver]: 3rd Parameter in Date_Sunrise() and Date_Sunset() is incorrectly named.
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: Open
+Status: Verified
-Type: Bug
+Type: Documentation Problem
Package: Date/time related
Operating System: N/A
PHP Version: 5.4.4
Block user comment: N
Private report: N
New Comment:
> 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.
Previous Comments:
------------------------------------------------------------------------
[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
Thread (3 messages)