예제 #1
0
파일: sfTime.php 프로젝트: homer6/altumo
 /**
  * Set the year value of this timestamp.
  *
  * @param	timestamp
  * @param	int
  * @return	timestamp
  */
 public static function setYear($ts = null, $year = 1970)
 {
     list($H, $i, $s, $m, $d, $Y) = sfDateTimeToolkit::breakdown($ts);
     return mktime($H, $i, $s, $m, $d, $year);
 }
예제 #2
0
 /**
  * Returns the timestamp for last day of the month for the given date.
  *
  * @param	timestamp
  * @return	timestamp
  */
 public static function finalDayOfMonth($ts = null)
 {
     list($H, $i, $s, $m, $d, $Y) = sfDateTimeToolkit::breakdown($ts);
     return mktime($H, $i, $s, $m, date('t', $ts), $Y);
 }