From 7e4c47b05c8c45049cdfa78cf67327ce6ed0bffb Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Sun, 11 Feb 2018 16:01:56 +0000 Subject: [PATCH] date_sun(rise|set) fails if the sun does not rise or set This integrates user note 114896. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344215 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/datetime/functions/date-sunrise.xml | 21 ++++++++++++++++++- reference/datetime/functions/date-sunset.xml | 21 ++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/reference/datetime/functions/date-sunrise.xml b/reference/datetime/functions/date-sunrise.xml index 3abcdbcbfd..41ececc5b1 100644 --- a/reference/datetime/functions/date-sunrise.xml +++ b/reference/datetime/functions/date-sunrise.xml @@ -114,7 +114,9 @@ &reftitle.returnvalues; Returns the sunrise time in a specified format on - success&return.falseforfailure;. + success&return.falseforfailure;. One potential reason for failure is that the + sun does not rise at all, which happens inside the polar circles for part of + the year. @@ -171,6 +173,23 @@ echo date("D M d Y"). ', sunrise time : ' .date_sunrise(time(), SUNFUNCS_RET_STR + + + + No sunrise + + +]]> + + &example.outputs; + + diff --git a/reference/datetime/functions/date-sunset.xml b/reference/datetime/functions/date-sunset.xml index 6ceae146e9..ce5525ec48 100644 --- a/reference/datetime/functions/date-sunset.xml +++ b/reference/datetime/functions/date-sunset.xml @@ -144,7 +144,9 @@ &reftitle.returnvalues; Returns the sunset time in a specified format on - success&return.falseforfailure;. + success&return.falseforfailure;. One potential reason for failure is that the + sun does not set at all, which happens inside the polar circles for part of + the year. @@ -173,6 +175,23 @@ echo date("D M d Y"). ', sunset time : ' .date_sunset(time(), SUNFUNCS_RET_STRIN + + + + No sunset + + +]]> + + &example.outputs; + +