__construct() публичный Метод

public __construct ( $year = null, $month = null, $day = null )
 public function __construct($dateTime, DateTimeZone $zone = null)
 {
     parent::__construct($dateTime);
     if ($zone) {
         $this->dateTime->setTimezone($zone);
     }
 }
Пример #2
0
 public function __construct($timestamp)
 {
     $month_day = date('j', $timestamp);
     $month = date('n', $timestamp);
     $year = date('Y', $timestamp);
     $this->timestamp = $timestamp;
     parent::__construct($month_day, $month, $year);
 }
Пример #3
0
 public function __construct($datetime = null, $tz = '')
 {
     parent::__construct($datetime);
     if ($tz == '') {
         $this->setTZ(date_default_timezone_get());
     } else {
         $this->setTZ($tz);
     }
 }
Пример #4
0
 public function __construct($datetime = null, $tz = '')
 {
     parent::__construct($datetime);
     if ($tz == '') {
         $this->setTZ(w2PgetConfig('system_timezone', 'UTC'));
     } else {
         $this->setTZ($tz);
     }
 }
Пример #5
0
 /**
  * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
  */
 public function __construct(\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate)
 {
     parent::__construct($localeDate);
     $this->_localToNormalFilter = new \Zend_Filter_LocalizedToNormalized(['date_format' => $this->_localeDate->getDateTimeFormat(\IntlDateFormatter::SHORT)]);
     $this->_normalToLocalFilter = new \Zend_Filter_NormalizedToLocalized(['date_format' => \Magento\Framework\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT]);
 }
Пример #6
0
 /**
  * Class constructor method
  *
  * @access public
  * 
  * @return void
  */
 public function __construct()
 {
     parent::__construct(current_time('timestamp'));
 }
Пример #7
0
 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes + ['size' => 24, 'class' => 'datetime']);
 }
Пример #8
0
 function __construct($name)
 {
     user_error('Datetime is deprecated. Use SSDatetime instead.', E_USER_NOTICE);
     parent::__construct($name);
 }
Пример #9
0
 public function __construct($data = null)
 {
     parent::__construct($data);
 }
Пример #10
0
 function __construct($time = null, $default_format = 'Y-m-d H:i:s')
 {
     parent::__construct($time, $default_format);
 }
Пример #11
0
 /**
  * Constructor
  *
  * @param $name
  * @param string $label
  * @param array $attr
  */
 public function __construct($name, $label = '', $from = null, $to = null, $formatDisplay = null, $formatStore = null, $attr = [])
 {
     parent::__construct($name, $label, $formatDisplay, $formatStore, $attr);
     $this->setTo(is_null($to) ? $name . '_to' : $to);
     $this->setFrom(is_null($from) ? $name . '_from' : $from);
 }
Пример #12
0
 function __construct($name)
 {
     // Debug::show( 'Created SSDatetime: ' . $name );
     parent::__construct($name);
 }