コード例 #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
ファイル: sfTime.class.php プロジェクト: solutema/siwapp-sf1
 /**
  * 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);
 }