Oct 30, 2009 - י"ב חשון תש"ע
Sunset/Sunrise detection in php
0 Comments | Posted by Moishe Beshkin in Reviews
During working on a project, which includes zmanim time detection, I investigated proper way to detect sunset and sunrise time.
There are integrated functions date_sunset and date_sunrise.
//detect current time $ts=mktime(); //latitude and longitude for Daugavpils, Latvia $lat=56+58/60; $long=24+8/60 //GMT offset for current location $gmtoffset=2; //traditional zenith for detecting zmanim $zenith=90+50/60; $today=date_sunset($ts, SUNFUNCS_RET_STRING, $lat, $long, $zenith, $gmtoffset);
This function will return value in the view HH:MM.
Popularity: 12% [?]

