Пример #1
0
 /**
  * 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);
 }