@@ -104,10 +104,10 @@ class Astro_Sunrise
104
104
* @var array Array containing sunrise/sunset, civil twilight, nautical twilight, astronomical twilight
105
105
*/
106
106
var $ twilight = array (
107
- 'effective ' => -.0145439 , // sunrise/sunset
107
+ 'effective ' => -.0145439 , // sunrise/sunset
108
108
'civil ' => -.104528 , // civil twilight
109
109
'nautical ' => -.207912 , // nautical twilight
110
- 'astronomical ' => -.309017 // astronomical twilight
110
+ 'astronomical ' => -.309017 // astronomical twilight
111
111
);
112
112
113
113
/**
@@ -243,7 +243,7 @@ function calcSunrise($isRise) {
243
243
244
244
// multiples of pi
245
245
$ A = 0.5 * M_PI ; // Quarter circle
246
- $ B = M_PI ; // Half circle
246
+ $ B = M_PI ; // Half circle
247
247
$ C = 1.5 * M_PI ; // 3/4 circle
248
248
$ D = 2 * M_PI ; // Full circle
249
249
@@ -281,7 +281,7 @@ function calcSunrise($isRise) {
281
281
$ S /= cos ($ Q ) * cos ($ E );
282
282
283
283
if (abs ($ S ) > 1 )
284
- return " (Mitternachtssonne/Dauernacht) " ;
284
+ return ' (Mitternachtssonne/Dauernacht) ' ;
285
285
286
286
$ S /= sqrt (-$ S * $ S + 1 );
287
287
$ S = $ A - atan2 ($ S , 1 );
@@ -302,15 +302,15 @@ function calcSunrise($isRise) {
302
302
$ V *= 24 / $ D ;
303
303
304
304
// Universal time
305
- $ hour = intval ($ U );
305
+ $ hour = intval ($ U );
306
306
$ U = ($ U - $ hour ) * 60 ;
307
307
$ min = intval ($ U );
308
308
$ U = ($ U - $ min ) * 60 ;
309
309
$ sec = intval ($ U );
310
310
$ this ->last_utc = gmmktime ($ hour , $ min , $ sec , $ this ->month , $ this ->mday , $ this ->year );
311
311
312
312
// Local time
313
- $ hour = intval ($ V );
313
+ $ hour = intval ($ V );
314
314
$ min = intval (($ V - $ hour ) * 60 + 0.5 );
315
315
316
316
return sprintf ('%02d:%02d ' , $ hour , $ min );
@@ -346,8 +346,8 @@ function norm($a, $b) { // normalize $a to be in [0, $b)
346
346
ON co.country_code = ci.country_code
347
347
WHERE
348
348
ci.ip_from >= ' .$ user_ip .' AND ci.ip_to <= ' .$ user_ip .'
349
- OR ci.ip_from >= ' .$ user_ip .' AND ci.ip_to <= ' .($ user_ip +200000000 ).'
350
- LIMIT 1 ' ; // little trick to have more often a match
349
+ OR ci.ip_from >= ' .$ user_ip .' AND ci.ip_to <= ' .($ user_ip +200000000 ).'
350
+ LIMIT 1 ' ; // little trick to have more often a match
351
351
$ result = $ db ->query ($ sql ,__FILE__ ,__LINE__ );
352
352
$ rs = $ db ->fetch ($ result );
353
353
@@ -362,7 +362,7 @@ function norm($a, $b) { // normalize $a to be in [0, $b)
362
362
363
363
$ suncalc = new Astro_Sunrise ();
364
364
$ suncalc ->setCoords ($ lat , $ lon );
365
- $ suncalc ->setTimezone (round ($ lon /15.0 )+date (" I " ));
365
+ $ suncalc ->setTimezone (round ($ lon /15.0 )+date (' I ' ));
366
366
$ suncalc ->setTimestamp (time ()+(3600 *round ($ lon /15.0 )+date ('I ' )));
367
367
$ sunrise = $ suncalc ->getSunrise ();
368
368
$ sunset = $ suncalc ->getSunset ();
0 commit comments