Example #1
0
 /**
  * @return Gpf_DateTime end of the month
  */
 public function getMonthEnd()
 {
     return new Gpf_DateTime(mktime(23, 59, 59, $this->getMonth(), Gpf_Common_DateUtils::getDaysInMonth($this->getMonth(), $this->getYear()), $this->getYear()), $this->serverTime);
 }
Example #2
0
 public static function transformToMonthEnd($date)
 {
     $timestamp = Gpf_Common_DateUtils::getTimestamp($date);
     $newdate = mktime(0, 0, 0, date("m", $timestamp), Gpf_Common_DateUtils::getDaysInMonth(date("m", $timestamp), date("Y", $timestamp)), date("Y", $timestamp));
     return Gpf_Common_DateUtils::getDate($newdate);
 }