Hello,
I need to shwo $percent if it is below 0.10 to be 0.01 for example.
case $timenow < $todayInfo['sunrise']: // is it pre-sunrise // get last night's sunset $nighttime = true; $yesterdayInfo = date_sun_info(strtotime('-1 days', $today), $lat, $long); $percent = round(($timenow - $yesterdayInfo['sunset'] )*100/($todayInfo['sunrise'] - $yesterdayInfo['sunset'])); break;
Thank you fro any help and/or advice in advanced,.
Best Regards,
Tim