Plugin Directory

Changeset 527100


Ignore:
Timestamp:
04/04/2012 06:34:09 AM (14 years ago)
Author:
rxn
Message:

added capital cities

Location:
sunrise-sunset/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sunrise-sunset/trunk/cities.txt

    r527078 r527100  
    11city:latitude:longitude:timezone:summertimezone
    2 Tucson, AZ:33.29:-122.04:MST:MST
     2Albany,NY:42.652594:-73.757314:EST:EDT
     3Annapolis, MD:38.972944:-76.501158:EST:EDT
     4Augusta, ME:44.310556:-69.78:EST:EDT
     5Austin, TX:30.25:-97.75:CST:CDT
    36Atlanta, GA:33.65:-84.42:EST:EDT
     7Baton Rouge, LA:30.458056:-91.140278:CST:CDT
     8Bismarck, ND:46.813333:-100.778889:CST:CDT
     9Boise, ID:43.613611:-116.203333:MST:MDT
     10Boston,MA:42.357778:-71.061667:EST:EDT
     11Carson City, NV:39.160833:-119.753889:PST:PDT
    412Charlotte,NC:35.22:-80.93:EST:EDT
     13Charleston, WV:38.347222:-81.633333:EST:EDT
     14Cheyenne, WY:41.145556:-104.801944:MST:MDT
    515Chicago, IL:41.51:-87.39:CST:CDT
    616Citra,FL:29.41167:-82.11:EST:EDT
     17Columbus, OH:39.983333:-82.983333:EST:EDT
     18Columbia, SC:34.000556:-81.044167:EST:EDT
     19Concord, NH:43.206667:-71.538056:EST:EDT
    720Crossville,TN:35.95:-85.08:CST:CDT
     21Denver,CO:39.739167:-104.984722:MST:MDT
     22Des Moines, IA:41.590833:-93.620833:CST:CDT
     23Dover,DE:39.161944:-75.526667:EST:EDT
     24Frankfort, KY:38.197222:84.863056:EST:EDT
     25Harrisburg, PA:40.269722:-76.875556:EST:EDT
     26Hartford, CT:41.762736:-72.674286:EST:EDT
     27Helena, MT:46.595806:-112.027031:MST:MDT
     28Honolulu,HI:21.308889:157.826111:HAST:HAST
     29Indianapolis,IN:39.7683:-86.1582:EST:EDT
     30Jackson, MS:32.298889:-90.184722:CST:CDT
     31Jefferson City, MO:38.576667:-92.173611:CST:CDT
     32Juneau, AK:58.444444:-134.229722:AKST:AKDT
     33Lansing, MI:42.7335:-84.5467:EST:EDT
     34Lincoln, NE:40.809722:-96.675278:CST:CDT
    835Los Angeles, CA:34.30:-118.15:PST:PDT
    936Lexington, KY:38.05:-85.00:EST:EDT
     37Little Rock, AR:34.736111:-92.331111:AR:CST:CDT
     38Madison, WI:43.066667:-89.4:CST:CDT
    1039Miami, FL:25.82:-80.28:EST:EDT
     40Montgomery, AL:32.361667:-86.279167:CST:CDT
     41Montpelier, VT:44.25:-72.566667:EST:EDT
    1142Nashville,TN:36.12:-86.68:CST:CDT
     43Oklahoma City,OK:35.4823:-97.5352:CST:CDT
     44Olympia, WA:47.0425:-122.893056:PST:PDT
    1245Orlando,FL:28.55:-81.33:EST:EDT
     46Phoenix, AZ:33.45:-112.066667:MST:MST
     47Pierre, SD:44.368056:-100.336389:CST:CDT
     48Providence, RI:41.823611:-71.422222:EST:EDT
     49Raleigh, NC:35.818889:-78.644722:EST:EDT
    1350Richmond,VA:37.50:-77.33:EST:EDT
    1451Roanoke Muni,VA:37.32:-79.97:EST:EDT
     52Sacramento, CA:38.555556:-121.468889:PST:PDT
     53Salem, OR:44.930833:-123.028889:PST:PDT
     54Salt Lake City, UT:40.75:-111.883333:MST:MDT
     55Santa Fe, NM:35.667222:-105.964444:MST:MDT
     56Springfield, IL:39.78325:-89.650373:CST:CDT
     57Saint Paul, MA:44.9441:-93.0852:CST:CDT
     58Tallahassee, FL:30.451667:-84.268533:EST:EDT
     59Trenton, NJ:40.223748:-74.764001:EST:EDT
     60Topeka, KS:39.055833:-95.689444:CST:CDT
     61Tucson, AZ:33.29:-122.04:MST:MST
    1562Waynesville, NC:35.483226:-82.994511:EST:EDT
  • sunrise-sunset/trunk/city.php

    r527059 r527100  
    1111    function __construct($name, $latitude, $longitude, $timezone, $summerTimezone)
    1212    {
    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);
    1818    }
    1919
  • sunrise-sunset/trunk/readme.txt

    r527078 r527100  
    44Requires at least: 3.0
    55Tested up to: 3.3.1
    6 Stable tag: 1.1.1
     6Stable tag: 1.1.2
    77License: GPLv2
    88
    9 SunriseSunset(ss) displays sunrise and sunset times. The three major cities included are: New York, Chicago and Los Angeles.
     9SunriseSunset displays sunrise and sunset times for the capital cities of the America (including miscellaneous cities).
     10Times displayed are local time.
     11
     12I would love to hear from you: [email protected]
     13
    1014
    1115== Description ==
    1216
    13 This widget displays the sunrise and sunset times for select cities. You can set the location
    14 using a drop down list.
     17This widget displays the sunrise and sunset times for select cities.
    1518
    16 To Add a city go to city.txt and add a line with the following format:
    17 <city>:<latitude>:<longitude>:<timezone>:<summertimezone>
     19IF YOU ARE UPGRADING please change the settings of the widget in the dashboard right after upgrading.
    1820
    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 
     21IF YOU ARE A DESIGNER: I am looking for someone to help me skin the widget.  I'll add you to the list of contributes
     22if you help make the widget look presentable.
    2523
    2624Please email me if you have any questions or requests: [email protected]
     25
     26Options includes:
     271) What city to display.
     282) Should sunrise be displayed?
     293) Should sunset be displayed?
     304) The title display at the top of the widget.
     31
    2732
    2833== Installation ==
     
    32371. Upload the SunriseSunset plugin to the /wp-content directory.
    33382. Activate it.
    34 3. Add it to your sidebar as a widget.
     393. Configure the settings in the Widget Admin Dashboard.
    3540
    3641
     
    4045Yes, you can. Simply email me and I'll try to accomodate your request : [email protected]
    4146
     47= I saw a bug! How can I help? =
     48You can write to me at [email protected].  Or send me a patch.
     49
     50I will try to accommodate you ASAP.
     51
    4252= What updates are planned for this widget? =
    4353Here 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.
    4757
    4858= How do I add more cities to this list? =
     
    58682. You can adjust the title and the city in the Dashboard. The widget uses local time.
    5969
     70== Changelog ==
     71= 1.1.2 =
     72* Added all capital cities of America.
    6073
    61 == Changelog ==
    6274= 1.1.1 =
    63 * Taking into account DST
    64 * Added more cities
     75* Taking into account DST.
     76* Added more cities.
    6577
    6678= 1.0.9 =
  • sunrise-sunset/trunk/sunrisesunset.php

    r527078 r527100  
    44Plugin URI: http://wordpress.org/extend/plugins/sunrise-sunset/
    55Description: Displays Sunrise and Sunset Times
    6 Version:  1.1.1
     6Version:  1.1.2
    77Author: Rex Posadas ([email protected])
    88Author URI: http://www.rxnfx.com/ss-plugin
     
    167167    {
    168168        $newTimestamp = 0;
    169         $daylightSavingsTime = 0;
    170169        $time_format = 'Y-m-d';
    171 
     170        $currentTimezone = $city->getTimezone();
    172171
    173172        $dstStart = '2012-03-11';
     
    175174        $today = date($time_format, $timestamp);
    176175
    177         if (( ( $today >= $dstStart ) && ( $today <= $dstEnd) )) {
    178             $daylightSavingsTime = 1;
    179         }
    180 
    181         switch ($city->getTimezone()) {
     176        if ((($today >= $dstStart) && ($today <= $dstEnd))) {
     177            $currentTimezone = $city->getSummerTimezone();
     178        }
     179
     180        switch ($currentTimezone) {
    182181            case 'EST':
    183                 $newTimestamp = $timestamp - ((5 - $daylightSavingsTime) * 60 * 60);
     182                $newTimestamp = $timestamp - (5 * 60 * 60);
    184183                break;
    185184            case 'EDT':
    186                 $newTimestamp = $timestamp - ((4 - $daylightSavingsTime) * 60 * 60);
     185                $newTimestamp = $timestamp - (4 * 60 * 60);
    187186                break;
    188187            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);
    190192                break;
    191193            case 'CST':
    192                 $newTimestamp = $timestamp - ((6 - $daylightSavingsTime) * 60 * 60);
     194                $newTimestamp = $timestamp - (6 * 60 * 60);
    193195                break;
    194196            case 'CDT':
    195                 $newTimestamp = $timestamp - ((5 - $daylightSavingsTime) * 60 * 60);
     197                $newTimestamp = $timestamp - (5 * 60 * 60);
    196198                break;
    197199            case 'PST':
    198                 $newTimestamp = $timestamp - ((8 - $daylightSavingsTime) * 60 * 60);
     200                $newTimestamp = $timestamp - (8 * 60 * 60);
    199201                break;
    200202            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        }
    208215
    209216
Note: See TracChangeset for help on using the changeset viewer.