Exemplo n.º 1
0
 public static function invertDate($date)
 {
     $mdate = new \Maestro\Types\MDate($date);
     return $mdate->invert();
 }
Exemplo n.º 2
0
 public function __construct($datetime = NULL, $format = '')
 {
     parent::__construct($datetime, $format ?: Manager::getOptions('formatTimestamp'));
 }
Exemplo n.º 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');
 }