Lines Matching refs:self

71         if ( $jalali   !== null ) self::$jalali   = (bool) $jalali;
72 if ( $convert !== null ) self::$convert = (bool) $convert;
73 if ( $timezone !== null ) self::$timezone = $timezone;
97 …$timezone = ($timezone != null) ? $timezone : ((self::$timezone != null) ? self::$timezone : date_…
101 if ( (self::$jalali === false && $jalali === null) || $jalali === false ) {
111 $intact = self::filterArray($chars, $intact);
122 list($jyear, $jmonth, $jday) = self::toJalali($year, $month, $day);
125 $keys = self::filterArray($chars, $keys, array('z'));
137 $v = self::getDayNames($obj->format('D'), true);
143 $v = self::getDayNames($obj->format('l'));
146 $v = self::getDayNames($obj->format('l'), false, 1, true);
152 $v = self::getDayNames($obj->format('l'), false, 1, true) - 1;
161 self::$temp['z'] = $v;
165 … $v = is_int(self::$temp['z'] / 7) ? (self::$temp['z'] / 7) : intval(self::$temp['z'] / 7 + 1);
169 $v = self::getMonthNames($jmonth);
175 $v = self::getMonthNames($jmonth, true);
211 …$v = self::getDayNames($obj->format('D'), true).', '.sprintf('%02d', $jday).' '.self::getMonthNam…
236 ($convert === null && self::$convert === false) ||
237 ( $jalali === false || $jalali === null && self::$jalali === false ))
238 ? $ret : self::convertNumbers($ret);
264 return self::date($format, $stamp, false, false, $timezone);
310 return self::date($format, $stamp, $convert, $jalali, $timezone);
341 $month = (intval($month) == 0) ? self::date('m') : $month;
342 $day = (intval($day) == 0) ? self::date('d') : $day;
343 $year = (intval($year) == 0) ? self::date('Y') : $year;
346 if ( $jalali === true || ($jalali === null && self::$jalali === true) ) {
347 list($year, $month, $day) = self::toGregorian($year, $month, $day);
353 if ( self::$timezone != null || $timezone != null ) {
354 … $obj = new DateTime($date, new DateTimeZone(($timezone != null) ? $timezone : self::$timezone));
389 $month = (intval($month) == 0) ? self::date('n') : intval($month);
390 $day = (intval($day) == 0) ? self::date('j') : intval($day);
391 $year = (intval($year) == 0) ? self::date('Y') : intval($year);
394 if ( $jalali === true || ($jalali === null && self::$jalali === true) )
396 $epoch = self::mktime(0, 0, 0, $month, $day, $year);
398 if( self::date('Y-n-j', $epoch,false) == "$year-$month-$day" ) {
445 return ($numeric) ? $day[0] : (($shorten) ? self::substr($day[1], 0, $len) : $day[1]);
460 return ($shorten) ? self::substr($ret, 0, $len) : $ret;
509 $g_day_no = 365*$gy+self::div($gy+3, 4)-self::div($gy+99, 100)+self::div($gy+399, 400);
519 $j_np = self::div($j_day_no, 12053);
522 $jy = 979+33*$j_np+4*self::div($j_day_no, 1461);
527 $jy += self::div($j_day_no-1, 365);
555 $j_day_no = 365*$jy + self::div($jy, 33)*8 + self::div($jy%33+3, 4);
563 $gy = 1600 + 400*self::div($g_day_no, 146097);
569 $gy += 100*self::div($g_day_no, 36524);
578 $gy += 4*self::div($g_day_no, 1461);
585 $gy += self::div($g_day_no, 365);