示例#1
0
 public static function invertDate($date)
 {
     $mdate = new \Maestro\Types\MDate($date);
     return $mdate->invert();
 }
示例#2
0
 public function __construct($datetime = NULL, $format = '')
 {
     parent::__construct($datetime, $format ?: Manager::getOptions('formatTimestamp'));
 }
示例#3
0
 /** Define how days left to given date. date according to dateFormat parameter passed on inizialization
  *    @access public
  *    @param date $date The date in traditional format for calculating diff
  *    @return int The amount of days between today and given date
  */
 public function howTo($date)
 {
     $today = new MDate(Manager::getSysDate());
     return $today->diff($date, '%a');
 }