Changeset 527100
- Timestamp:
- 04/04/2012 06:34:09 AM (14 years ago)
- Location:
- sunrise-sunset/trunk
- Files:
-
- 4 edited
-
cities.txt (modified) (1 diff)
-
city.php (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
-
sunrisesunset.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sunrise-sunset/trunk/cities.txt
r527078 r527100 1 1 city:latitude:longitude:timezone:summertimezone 2 Tucson, AZ:33.29:-122.04:MST:MST 2 Albany,NY:42.652594:-73.757314:EST:EDT 3 Annapolis, MD:38.972944:-76.501158:EST:EDT 4 Augusta, ME:44.310556:-69.78:EST:EDT 5 Austin, TX:30.25:-97.75:CST:CDT 3 6 Atlanta, GA:33.65:-84.42:EST:EDT 7 Baton Rouge, LA:30.458056:-91.140278:CST:CDT 8 Bismarck, ND:46.813333:-100.778889:CST:CDT 9 Boise, ID:43.613611:-116.203333:MST:MDT 10 Boston,MA:42.357778:-71.061667:EST:EDT 11 Carson City, NV:39.160833:-119.753889:PST:PDT 4 12 Charlotte,NC:35.22:-80.93:EST:EDT 13 Charleston, WV:38.347222:-81.633333:EST:EDT 14 Cheyenne, WY:41.145556:-104.801944:MST:MDT 5 15 Chicago, IL:41.51:-87.39:CST:CDT 6 16 Citra,FL:29.41167:-82.11:EST:EDT 17 Columbus, OH:39.983333:-82.983333:EST:EDT 18 Columbia, SC:34.000556:-81.044167:EST:EDT 19 Concord, NH:43.206667:-71.538056:EST:EDT 7 20 Crossville,TN:35.95:-85.08:CST:CDT 21 Denver,CO:39.739167:-104.984722:MST:MDT 22 Des Moines, IA:41.590833:-93.620833:CST:CDT 23 Dover,DE:39.161944:-75.526667:EST:EDT 24 Frankfort, KY:38.197222:84.863056:EST:EDT 25 Harrisburg, PA:40.269722:-76.875556:EST:EDT 26 Hartford, CT:41.762736:-72.674286:EST:EDT 27 Helena, MT:46.595806:-112.027031:MST:MDT 28 Honolulu,HI:21.308889:157.826111:HAST:HAST 29 Indianapolis,IN:39.7683:-86.1582:EST:EDT 30 Jackson, MS:32.298889:-90.184722:CST:CDT 31 Jefferson City, MO:38.576667:-92.173611:CST:CDT 32 Juneau, AK:58.444444:-134.229722:AKST:AKDT 33 Lansing, MI:42.7335:-84.5467:EST:EDT 34 Lincoln, NE:40.809722:-96.675278:CST:CDT 8 35 Los Angeles, CA:34.30:-118.15:PST:PDT 9 36 Lexington, KY:38.05:-85.00:EST:EDT 37 Little Rock, AR:34.736111:-92.331111:AR:CST:CDT 38 Madison, WI:43.066667:-89.4:CST:CDT 10 39 Miami, FL:25.82:-80.28:EST:EDT 40 Montgomery, AL:32.361667:-86.279167:CST:CDT 41 Montpelier, VT:44.25:-72.566667:EST:EDT 11 42 Nashville,TN:36.12:-86.68:CST:CDT 43 Oklahoma City,OK:35.4823:-97.5352:CST:CDT 44 Olympia, WA:47.0425:-122.893056:PST:PDT 12 45 Orlando,FL:28.55:-81.33:EST:EDT 46 Phoenix, AZ:33.45:-112.066667:MST:MST 47 Pierre, SD:44.368056:-100.336389:CST:CDT 48 Providence, RI:41.823611:-71.422222:EST:EDT 49 Raleigh, NC:35.818889:-78.644722:EST:EDT 13 50 Richmond,VA:37.50:-77.33:EST:EDT 14 51 Roanoke Muni,VA:37.32:-79.97:EST:EDT 52 Sacramento, CA:38.555556:-121.468889:PST:PDT 53 Salem, OR:44.930833:-123.028889:PST:PDT 54 Salt Lake City, UT:40.75:-111.883333:MST:MDT 55 Santa Fe, NM:35.667222:-105.964444:MST:MDT 56 Springfield, IL:39.78325:-89.650373:CST:CDT 57 Saint Paul, MA:44.9441:-93.0852:CST:CDT 58 Tallahassee, FL:30.451667:-84.268533:EST:EDT 59 Trenton, NJ:40.223748:-74.764001:EST:EDT 60 Topeka, KS:39.055833:-95.689444:CST:CDT 61 Tucson, AZ:33.29:-122.04:MST:MST 15 62 Waynesville, NC:35.483226:-82.994511:EST:EDT -
sunrise-sunset/trunk/city.php
r527059 r527100 11 11 function __construct($name, $latitude, $longitude, $timezone, $summerTimezone) 12 12 { 13 $this->_name = $name;14 $this->_latitude = $latitude;15 $this->_longitude = $longitude;16 $this->_timezone = $timezone;17 $this->_summerTimezone = $summerTimezone;13 $this->_name = trim($name); 14 $this->_latitude = trim($latitude); 15 $this->_longitude = trim($longitude); 16 $this->_timezone = trim($timezone); 17 $this->_summerTimezone = trim($summerTimezone); 18 18 } 19 19 -
sunrise-sunset/trunk/readme.txt
r527078 r527100 4 4 Requires at least: 3.0 5 5 Tested up to: 3.3.1 6 Stable tag: 1.1. 16 Stable tag: 1.1.2 7 7 License: GPLv2 8 8 9 SunriseSunset(ss) displays sunrise and sunset times. The three major cities included are: New York, Chicago and Los Angeles. 9 SunriseSunset displays sunrise and sunset times for the capital cities of the America (including miscellaneous cities). 10 Times displayed are local time. 11 12 I would love to hear from you: [email protected] 13 10 14 11 15 == Description == 12 16 13 This widget displays the sunrise and sunset times for select cities. You can set the location 14 using a drop down list. 17 This widget displays the sunrise and sunset times for select cities. 15 18 16 To Add a city go to city.txt and add a line with the following format: 17 <city>:<latitude>:<longitude>:<timezone>:<summertimezone> 19 IF YOU ARE UPGRADING please change the settings of the widget in the dashboard right after upgrading. 18 20 19 For example: 20 Miami, FL:25.82:-80.28:EST:EDT 21 22 Logitude is always negative for cities in the United States. This plugin should handle cities from different 23 countries, but it has not been tested. 24 21 IF YOU ARE A DESIGNER: I am looking for someone to help me skin the widget. I'll add you to the list of contributes 22 if you help make the widget look presentable. 25 23 26 24 Please email me if you have any questions or requests: [email protected] 25 26 Options includes: 27 1) What city to display. 28 2) Should sunrise be displayed? 29 3) Should sunset be displayed? 30 4) The title display at the top of the widget. 31 27 32 28 33 == Installation == … … 32 37 1. Upload the SunriseSunset plugin to the /wp-content directory. 33 38 2. Activate it. 34 3. Add it to your sidebar as a widget.39 3. Configure the settings in the Widget Admin Dashboard. 35 40 36 41 … … 40 45 Yes, you can. Simply email me and I'll try to accomodate your request : [email protected] 41 46 47 = I saw a bug! How can I help? = 48 You can write to me at [email protected]. Or send me a patch. 49 50 I will try to accommodate you ASAP. 51 42 52 = What updates are planned for this widget? = 43 53 Here are some: 44 # Adding more cities.45 # Better design.46 # The ability to use custom longitude and latitude.54 * Better design. 55 * The ability to add images. 56 * The ablity to add cities in the Admin Dashboard. 47 57 48 58 = How do I add more cities to this list? = … … 58 68 2. You can adjust the title and the city in the Dashboard. The widget uses local time. 59 69 70 == Changelog == 71 = 1.1.2 = 72 * Added all capital cities of America. 60 73 61 == Changelog ==62 74 = 1.1.1 = 63 * Taking into account DST 64 * Added more cities 75 * Taking into account DST. 76 * Added more cities. 65 77 66 78 = 1.0.9 = -
sunrise-sunset/trunk/sunrisesunset.php
r527078 r527100 4 4 Plugin URI: http://wordpress.org/extend/plugins/sunrise-sunset/ 5 5 Description: Displays Sunrise and Sunset Times 6 Version: 1.1. 16 Version: 1.1.2 7 7 Author: Rex Posadas ([email protected]) 8 8 Author URI: http://www.rxnfx.com/ss-plugin … … 167 167 { 168 168 $newTimestamp = 0; 169 $daylightSavingsTime = 0;170 169 $time_format = 'Y-m-d'; 171 170 $currentTimezone = $city->getTimezone(); 172 171 173 172 $dstStart = '2012-03-11'; … … 175 174 $today = date($time_format, $timestamp); 176 175 177 if (( ( $today >= $dstStart ) && ( $today <= $dstEnd))) {178 $ daylightSavingsTime = 1;179 } 180 181 switch ($c ity->getTimezone()) {176 if ((($today >= $dstStart) && ($today <= $dstEnd))) { 177 $currentTimezone = $city->getSummerTimezone(); 178 } 179 180 switch ($currentTimezone) { 182 181 case 'EST': 183 $newTimestamp = $timestamp - ( (5 - $daylightSavingsTime)* 60 * 60);182 $newTimestamp = $timestamp - (5 * 60 * 60); 184 183 break; 185 184 case 'EDT': 186 $newTimestamp = $timestamp - ( (4 - $daylightSavingsTime)* 60 * 60);185 $newTimestamp = $timestamp - (4 * 60 * 60); 187 186 break; 188 187 case 'MST': 189 $newTimestamp = $timestamp - ((7 - $daylightSavingsTime) * 60 * 60); 188 $newTimestamp = $timestamp - (7 * 60 * 60); 189 break; 190 case 'MDT': 191 $newTimestamp = $timestamp - (6 * 60 * 60); 190 192 break; 191 193 case 'CST': 192 $newTimestamp = $timestamp - ( (6 - $daylightSavingsTime)* 60 * 60);194 $newTimestamp = $timestamp - (6 * 60 * 60); 193 195 break; 194 196 case 'CDT': 195 $newTimestamp = $timestamp - ( (5 - $daylightSavingsTime)* 60 * 60);197 $newTimestamp = $timestamp - (5 * 60 * 60); 196 198 break; 197 199 case 'PST': 198 $newTimestamp = $timestamp - ( (8 - $daylightSavingsTime)* 60 * 60);200 $newTimestamp = $timestamp - (8 * 60 * 60); 199 201 break; 200 202 case 'PDT': 201 $newTimestamp = $timestamp - ((7 - $daylightSavingsTime) * 60 * 60); 202 break; 203 } 204 205 206 $olddate = date($time_format, $timestamp); 207 $newdate = date($time_format, $newTimestamp); 203 $newTimestamp = $timestamp - (7 * 60 * 60); 204 break; 205 case 'AKST': 206 $newTimestamp = $timestamp - (9 * 60 * 60); 207 break; 208 case 'AKDT': 209 $newTimestamp = $timestamp - (8 * 60 * 60); 210 break; 211 case 'HAST': 212 $newTimestamp = $timestamp - (10 * 60 * 60); 213 break; 214 } 208 215 209 216
Note: See TracChangeset
for help on using the changeset viewer.