date_sunset() returns the sunset time for a given day (specified as a timestamp) and location. The latitude, longitude and zenith parameters default to the date.default_latitude, date.default_longitude and date.sunset_zenith configuration options, respectively.
The latitude defaults to North. So, if you want to specify a South value, you must pass a negative value. The same note applies to longitude, which defaults to East.
I love PHP, but I really wonder about things like this. We’ve talked before about some problems with the language (especially compared to Perl), like inconsistent function naming, and — as this function perhaps demonstrates — having too many functions in the core.
Isn’t this something that PEAR could have handled? Does this need to be built into the core? What percentage of PHP programmers have a need for this?