/** * Returns the timestamp for last day of the week for the given date. * * @param timestamp * @return timestamp */ public static function finalDayOfWeek($ts = null) { return sfTime::subtractDay(sfTime::firstDayOfWeek(sfTime::addWeek($ts))); }