__construct() public method

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);
 }
 public function __construct($data = null)
 {
     parent::__construct($data);
 }
示例#10
0
文件: dateTime.php 项目: ateliee/pmp
 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);
 }