Changeset 808859
- Timestamp:
- 11/22/2013 01:45:54 PM (12 years ago)
- Location:
- adatosystems-friday-zmanim/trunk
- Files:
-
- 1 deleted
- 2 edited
-
license.txt (deleted)
-
readme.txt (modified) (3 diffs)
-
zmanfriday.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
adatosystems-friday-zmanim/trunk/readme.txt
r807212 r808859 5 5 Requires at least: 3.3 6 6 Tested up to: 3.7.1 7 <<<<<<< .mine 8 Stable tag: 1.7 9 ======= 7 10 Stable tag: 1.6 11 >>>>>>> .r808858 8 12 License: GPLv2 or later 9 13 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 67 71 Check the "debug" option at the bottom of the widget to get some of the initial calculations that are coming in. Otherwise, contact the developer. I hear he's a great guy. 68 72 73 <<<<<<< .mine 69 74 = I put in my zipcode but I'm not getting the right location. = 70 75 Get the latitude/longitude for your location and use that instead. 71 76 77 = I put in the latitude/longitude but it's showing the completely wrong city = 78 The chances are when you googled "latitude longitude for xxxx" it gave you two regular numbers. What you need to pay attention to is the North/South and East/West items. If the number is South or West, then you need to make the number negative. Example: San Francisco is 37.7833 N, 122.4167 W. But if you leave the longitude as 122.4167 you'll get Weihai, China. 79 80 81 ======= 82 = I put in my zipcode but I'm not getting the right location. = 83 Get the latitude/longitude for your location and use that instead. 84 85 >>>>>>> .r808858 72 86 == Screenshots == 73 87 … … 78 92 == Changelog == 79 93 94 <<<<<<< .mine 95 = 1.7 = 96 * Fixed issues with Plag and Shema, proving yet again that developers should not QA their own code. 97 80 98 = 1.6 = 81 99 * Added options for Latitude/Longitude for those locations where the postal code doesn't work. 82 100 * If using Lat/Long, returns location name in that location's language (if possible) 83 101 102 ======= 103 = 1.6 = 104 * Added options for Latitude/Longitude for those locations where the postal code doesn't work. 105 * If using Lat/Long, returns location name in that location's language (if possible) 106 107 >>>>>>> .r808858 84 108 = 1.5 = 85 109 * Using sunrise/sunset (instead of calculating it within the code) because of mis-matches in DST (daylight savings time) calculations. -
adatosystems-friday-zmanim/trunk/zmanfriday.php
r807212 r808859 6 6 * Uses the inimitable Hebcal.com site for parsha and other information, 7 7 * as well as Google Maps API for geographic and sunrise/sunset information. 8 <<<<<<< .mine 9 * Version: 1.7 10 ======= 8 11 * Version: 1.6 12 >>>>>>> .r808858 9 13 * Author: Leon Adato 10 14 * Author URI: http://www.adatosystems.com/ … … 17 21 * 2013-10-24 - changed Lat/Long call to use geocoder.us, timezone to use 18 22 * 2013-11-13 - more changes to fix up time zone and dst stuff. 23 <<<<<<< .mine 24 * 2013-11-15 - add option for latitude/longitude instead of postal code; also returns location in that locale's language if possible 25 * 2013-11-22 - fixed more calculatings, proving once again that developers should not QA their own code. 26 ======= 19 27 * 2013-11-22 - add option for latitude/longitude instead of postal code; also returns location in that locale's language if possible 28 >>>>>>> .r808858 20 29 * 21 30 * This program is free software: you can redistribute it and/or modify … … 143 152 $frisunrise = $tzjd['dates'][0]['sunrise']; 144 153 $frisunset = $tzjd['dates'][0]['sunset']; 154 //***Gives "2013-11-22 17:01". Now convert to date, and set the text to something readable 155 $frisunrisedatetime = strtotime($frisunrise); 156 $frisunsetdatetime = strtotime($frisunset); 145 157 146 158 $saturl = "http://api.geonames.org/timezoneJSON?lat=".$lat."&lng=".$long."&date=".$saturday_txt."&username=adatosystems"; … … 155 167 $satsunrise = $tzjd['dates'][0]['sunrise']; 156 168 $satsunset = $tzjd['dates'][0]['sunset']; 169 $satsunrisedatetime = strtotime($satsunrise); 170 $satsunsetdatetime = strtotime($satsunset); 157 171 158 172 // Get Hebrew Date from HebCal … … 198 212 } //end get Parsha reading 199 213 214 //**DO YOU NEED TO FIX THIS?!?!** 200 215 // Calculate Plag haMincha 201 216 if($instance['showplag']) { 202 $sunrisesec = $frisun info['sunrise']+$offset;203 $sunsetsec = $frisun info['sunset']+$offset;217 $sunrisesec = $frisunrisedatetime+$offset; 218 $sunsetsec = $frisunsetdatetime+$offset; 204 219 if($instance['plagmethod'] == "gra") { 205 220 $halachichour = ($sunsetsec - $sunrisesec)/12; … … 219 234 // Calculate Shema 220 235 if($instance['showshema']) { 221 $sunrisesec = $frisun info['sunrise']+$offset;222 $sunsetsec = $frisun info['sunset']+$offset;236 $sunrisesec = $frisunrisedatetime+$offset; 237 $sunsetsec = $frisunsetdatetime+$offset; 223 238 if($instance['shemamethod'] == "gra") { 224 239 $halachichour = ($sunsetsec - $sunrisesec)/12; … … 237 252 238 253 // Calculate Candles & havdalah 239 if($instance['showcandles']) { $candletime = date($timedisplay, strtotime($frisunset)-($instance['cmin']*60 ) ); }240 if($instance['showhavdalah']) {$havdalahtime = date($timedisplay, strtotime($satsunset)+($instance['m']*60) ); }254 if($instance['showcandles']) { $candletime = date($timedisplay, $frisunsetdatetime-($instance['cmin']*60 ) ); } 255 if($instance['showhavdalah']) {$havdalahtime = date($timedisplay, $satsunsetdatetime+($instance['m']*60) ); } 241 256 242 257 // Display the widget already! … … 250 265 if($instance['showplag'] ) {echo $plagtext.'<br />'; } 251 266 if($instance['showcandles'] ) {echo '<span id="zmantitle">Candle Lighting Time: </span>'.$candletime.'<br />'; } 252 if($instance['showfrisunset'] ) {echo '<span id="zmantitle">Sunset Friday: </span>'. $frisunset.'<br />';}253 if($instance['showsunrise'] ) {echo '<span id="zmantitle">Sunrise: </span>'. $frisunrise.'<br /> ';}267 if($instance['showfrisunset'] ) {echo '<span id="zmantitle">Sunset Friday: </span>'.date($timedisplay,$frisunsetdatetime).'<br />';} 268 if($instance['showsunrise'] ) {echo '<span id="zmantitle">Sunrise: </span>'.date($timedisplay, $frisunrisedatetime).'<br /> ';} 254 269 if($instance['showshema'] ) {echo $shematext.'<br />'; } 255 if($instance['showsatsunset'] ) {echo '<span id="zmantitle">Sunset Saturday: </span>'. $satsunset.'<br />';}270 if($instance['showsatsunset'] ) {echo '<span id="zmantitle">Sunset Saturday: </span>'.date($timedisplay, $satsunsetdatetime).'<br />';} 256 271 if($instance['showhavdalah'] ) {echo $titlehavdalah.' ('.$instance['m'].' min): '.$havdalahtime.'<br />'; } 257 272 if($instance['love'] ) {echo $lovetext.'<br />'; } … … 335 350 <p> 336 351 <label for="<?php echo $this->get_field_id('zip'); ?>">Zip code:</label> 352 <<<<<<< .mine 353 <input id="<?php echo $this->get_field_id('zip'); ?>" name="<?php echo $this->get_field_name('zip'); ?>" value="<?php echo $instance['zip']; ?>" size="5" maxlength="5" /><br /> 354 Or provide the latitude/Longitude<br /> 355 <label for="<?php echo $this->get_field_id('userlat'); ?>">Latitude:</label> 356 <input id="<?php echo $this->get_field_id('userlat'); ?>" name="<?php echo $this->get_field_name('userlat'); ?>" value="<?php echo $instance['userlat']; ?>" size="15" maxlength="15" /><br /> 357 <label for="<?php echo $this->get_field_id('userlong'); ?>">Longitude:</label> 358 <input id="<?php echo $this->get_field_id('userlong'); ?>" name="<?php echo $this->get_field_name('userlong'); ?>" value="<?php echo $instance['userlong']; ?>" size="15" maxlength="15" /> 359 ======= 337 360 <input id="<?php echo $this->get_field_id('zip'); ?>" name="<?php echo $this->get_field_name('zip'); ?>" value="<?php echo $instance['zip']; ?>" size="5" maxlength="5" /><br /> 338 361 Or provide the latitude/Longitude<br /> … … 341 364 <label for="<?php echo $this->get_field_id('userlong'); ?>">Longitude:</label> 342 365 <input id="<?php echo $this->get_field_id('userlong'); ?>" name="<?php echo $this->get_field_name('userlong'); ?>" value="<?php echo $instance['userlong']; ?>" size="7" maxlength="7" /> 366 >>>>>>> .r808858 343 367 </p> 344 368
Note: See TracChangeset
for help on using the changeset viewer.