Plugin Directory

Changeset 920308


Ignore:
Timestamp:
05/24/2014 10:37:19 AM (12 years ago)
Author:
lord_viper
Message:

new update

Location:
wp-parsidate
Files:
30 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-parsidate/trunk/lib/parsidate.php

    r839056 r920308  
    6565        $leap=self::IsLeapYear($gy-1);
    6666        $leab=self::IsLeapYear($gy);
    67         if($leap and $gm>2)
    68         ++$gd;
    6967        if($dayofyear>79)
    7068        {
    7169         $jd=($leab)?$dayofyear-78:$dayofyear-79;
    7270         $jy=$gy-621;
    73          for($i=0;$jd>$this->j_days_in_month[$i];$i++)
    74             $jd-=$this->j_days_in_month[$i];
    7571        }
    7672        else
    7773        {
    7874         $jd=($leap||($leab&&$gm>2))?287+$dayofyear:286+$dayofyear;
    79          $jy=$gy-622;
    80          if($jd==366)
    81          return array($jy,12,30);
    82          for($i=0;$jd>$this->j_days_in_month[$i];$i++)
    83              $jd-=$this->j_days_in_month[$i]; 
     75         $jy=$gy-622;
    8476        }
     77        for($i=0;$i<11 and $jd>$this->j_days_in_month[$i];$i++)
     78        $jd-=$this->j_days_in_month[$i];
    8579        $jm=++$i;
    8680        return array($jy,$jm,$jd);   
    87     }
     81    } 
    8882   
    8983    public function trim_number($num,$sp='٫')
     
    9892    {
    9993      $j_days_in_month = array(31, 62, 93, 124, 155, 186, 216, 246, 276, 306, 336, 365);
    100         if(strtotime($date)){
    101             $timestamp=strtotime($date);
    102         }else{
    103             $timestamp = $date ;
    104         }
     94      $timestamp = is_numeric($date) && (int)$date == $date?$date:strtotime($date);
    10595     
    10696      $date=getdate($timestamp);
  • wp-parsidate/trunk/readme.txt

    r898582 r920308  
    44Tags: shamsi, wp-parsi, wpparsi, persian, parsi, farsi, jalali, date, calendar, i18n, l10n, Iran, Iranian, parsidate, rtl
    55Requires at least: 3.6
    6 Tested up to: 3.9
    7 Stable tag: 1.3.3
     6Tested up to: 3.9.1
     7Stable tag: 1.3.4
    88
    99Persian package builder for WordPress, Full RTL and Shamsi(Jalali) date
     
    3939
    4040== Changelog ==
     41= 1.3.4 =
     42* unix timstamp problems fixed
     43* languages fixed
     44* core functions improved
     45
    4146= 1.3.3 =
    4247* editor problems fixed
  • wp-parsidate/trunk/wp-parsidate.php

    r919456 r920308  
    33/*
    44Plugin Name: WP-Parsidate
    5 Version: 1.3.3
     5Version: 1.3.4
    66Author: Mobin Ghasempoor
    77Author URI: http://wp-parsi.com/
Note: See TracChangeset for help on using the changeset viewer.