Plugin Directory

Changeset 449355


Ignore:
Timestamp:
10/10/2011 04:23:51 AM (14 years ago)
Author:
beshkin
Message:

tagging version 1.13

Location:
zmanim-widget
Files:
5 edited
16 copied

Legend:

Unmodified
Added
Removed
  • zmanim-widget/tags/1.13/functions.php

    r273189 r449355  
    3030}
    3131
    32 function dstWindow ($ts)
     32function dstWindow ($ts, $location="None")
    3333{
    3434$in_dst="false";
     
    4040$hour=date("H",$sunday_ts);
    4141$day=date("j",$ts);
    42 if( ($sunday_month>=3) && ($sunday_month<=10) ) // IS CURRENT DATE INSIDE OF APRIL->OCT WINDOW?
     42$year=date("Y",$ts);
     43if (preg_match("/.*Israel.*/i",$location))
    4344{
     45    $jdCurrent_t = gregoriantojd($month, $day, $year);
     46    $jewishDate_t = jdtojewish($jdCurrent_t);
     47    list($jewishMonth_t, $jewishDay_t, $jewishYear_t) = split('/', $jewishDate_t);
     48        //print $jewishDate_t;
     49    if (($jewishMonth_t >=1) && ($jewishMonth_t <=7))
     50    {
    4451        $in_dst="true";
    45         /*if($sunday_month=="4") //IS IT APRIL?
     52        if (($jewishMonth_t >=1) && ($sunday_ts <= $ts))
    4653        {
    47                 if ($sunday<=7) //IS IT THE FIRST SUN OF THE MONTH?
    48                 {
    49                         $in_dst="true";
    50                 }else{
    51                         $in_dst="false";
    52                 }
    53 
     54            $in_dst="false";
    5455        }
    55     else*/ if($sunday_month=="3") //IS IT MARCH?
    56     {
    57         if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH?
    58                 {
    59                        $in_dst="true";
    60                 }else{
    61             $in_dst="false";
    62         }
    63     }
     56        if (($jewishMonth_t <=7) && ($sunday_ts >= $ts))
     57        {
     58            $in_dst="false";
     59        }
     60    }
     61}else{
     62    if( ($sunday_month>=3) && ($sunday_month<=10) ) // IS CURRENT DATE INSIDE OF MARCH->OCT WINDOW?
     63    {
     64        $in_dst="true";
     65        if($sunday_month=="3") //IS IT MARCH?
     66        {
     67            if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH?
     68            {
     69                $in_dst="true";
     70            }else{
     71                $in_dst="false";
     72            }
     73        }
    6474        elseif($sunday_month=="10") //IS IT OCT?
    6575        {
    66                 if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH?
    67                 {
    68                        $in_dst="false";
    69                 }else{
    70             $in_dst="true";
    71         }
     76            if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH?
     77            {
     78                    $in_dst="false";
     79            }else{
     80                    $in_dst="true";
     81            }
    7282        }
     83    }
    7384}
    7485return $in_dst;
  • zmanim-widget/tags/1.13/message.php

    r427430 r449355  
    9494
    9595//timestamp according to UTC offset
    96 if (dstWindow($ts)=="true" ){
     96
     97if (dstWindow($ts, $data['location'])=="true" ){
    9798        if ($data['dst'] == "true")
    9899        $shoffset++;
  • zmanim-widget/tags/1.13/readme.txt

    r446309 r449355  
    44Requires at least: 2.7
    55Tested up from : 3.0
    6 Stable tag: 1.12.3
     6Stable tag: 1.13
    77
    88Displays Jewish calendar information in a widget.
     
    2424
    2525== Changelog ==
     26= 1.13 =
     27- added mechanism for detection of Israel Day Saving Time.
    2628= 1.12.2 =
    2729- small wording fix in admin part
  • zmanim-widget/tags/1.13/zmanim-widget.php

    r446309 r449355  
    44 Plugin URI: http://kosherdev.com/category/zmanim-widget/
    55 Description: Allows to show zmanim, upcoming hollidays and current Torah chapter on your Wordpress site.
    6  Version: 1.12.3
     6 Version: 1.13
    77 Author: Misha Beshkin
    88 Author URI: http://misha.beshkin.lv/
  • zmanim-widget/trunk/functions.php

    r273189 r449355  
    3030}
    3131
    32 function dstWindow ($ts)
     32function dstWindow ($ts, $location="None")
    3333{
    3434$in_dst="false";
     
    4040$hour=date("H",$sunday_ts);
    4141$day=date("j",$ts);
    42 if( ($sunday_month>=3) && ($sunday_month<=10) ) // IS CURRENT DATE INSIDE OF APRIL->OCT WINDOW?
     42$year=date("Y",$ts);
     43if (preg_match("/.*Israel.*/i",$location))
    4344{
     45    $jdCurrent_t = gregoriantojd($month, $day, $year);
     46    $jewishDate_t = jdtojewish($jdCurrent_t);
     47    list($jewishMonth_t, $jewishDay_t, $jewishYear_t) = split('/', $jewishDate_t);
     48        //print $jewishDate_t;
     49    if (($jewishMonth_t >=1) && ($jewishMonth_t <=7))
     50    {
    4451        $in_dst="true";
    45         /*if($sunday_month=="4") //IS IT APRIL?
     52        if (($jewishMonth_t >=1) && ($sunday_ts <= $ts))
    4653        {
    47                 if ($sunday<=7) //IS IT THE FIRST SUN OF THE MONTH?
    48                 {
    49                         $in_dst="true";
    50                 }else{
    51                         $in_dst="false";
    52                 }
    53 
     54            $in_dst="false";
    5455        }
    55     else*/ if($sunday_month=="3") //IS IT MARCH?
    56     {
    57         if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH?
    58                 {
    59                        $in_dst="true";
    60                 }else{
    61             $in_dst="false";
    62         }
    63     }
     56        if (($jewishMonth_t <=7) && ($sunday_ts >= $ts))
     57        {
     58            $in_dst="false";
     59        }
     60    }
     61}else{
     62    if( ($sunday_month>=3) && ($sunday_month<=10) ) // IS CURRENT DATE INSIDE OF MARCH->OCT WINDOW?
     63    {
     64        $in_dst="true";
     65        if($sunday_month=="3") //IS IT MARCH?
     66        {
     67            if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH?
     68            {
     69                $in_dst="true";
     70            }else{
     71                $in_dst="false";
     72            }
     73        }
    6474        elseif($sunday_month=="10") //IS IT OCT?
    6575        {
    66                 if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH?
    67                 {
    68                        $in_dst="false";
    69                 }else{
    70             $in_dst="true";
    71         }
     76            if ($sunday>=25 ) //IS IT THE LAST SUN OF THE MONTH?
     77            {
     78                    $in_dst="false";
     79            }else{
     80                    $in_dst="true";
     81            }
    7282        }
     83    }
    7384}
    7485return $in_dst;
  • zmanim-widget/trunk/message.php

    r427430 r449355  
    9494
    9595//timestamp according to UTC offset
    96 if (dstWindow($ts)=="true" ){
     96
     97if (dstWindow($ts, $data['location'])=="true" ){
    9798        if ($data['dst'] == "true")
    9899        $shoffset++;
  • zmanim-widget/trunk/readme.txt

    r446309 r449355  
    44Requires at least: 2.7
    55Tested up from : 3.0
    6 Stable tag: 1.12.3
     6Stable tag: 1.13
    77
    88Displays Jewish calendar information in a widget.
     
    2424
    2525== Changelog ==
     26= 1.13 =
     27- added mechanism for detection of Israel Day Saving Time.
    2628= 1.12.2 =
    2729- small wording fix in admin part
  • zmanim-widget/trunk/zmanim-widget.php

    r446309 r449355  
    44 Plugin URI: http://kosherdev.com/category/zmanim-widget/
    55 Description: Allows to show zmanim, upcoming hollidays and current Torah chapter on your Wordpress site.
    6  Version: 1.12.3
     6 Version: 1.13
    77 Author: Misha Beshkin
    88 Author URI: http://misha.beshkin.lv/
Note: See TracChangeset for help on using the changeset viewer.