public static function firstDayOfQuarter($ts = null)
	{
		// default to now
		if ($ts === null) $ts = sfDateTimeToolkit::now();
		
		// variables for computation
		$month = date('m', $ts);
		$quarter = ceil($month / 3) - 1; // zero based quarter
		
		return sfTime::subtractMonth(sfTime::firstDayOfMonth($ts), $month - ($quarter * 3) - 1);
	}
public static function firstDayOfQuarter($ts = null)
	{
		// default to now
		if ($ts === null) $ts = sfDateTimeToolkit::now();
		
		// variables for computation
		$month = date('m', $ts);
		$quarter = ceil($month / 3) - 1; // zero based quarter
		
		return sfTime::subtractMonth(sfTime::firstDayOfMonth($ts), $month - ($quarter * 3) - 1);
	}
public static function firstDayOfQuarter ( $ ts = null ) { // default to now if ( $ ts === null ) $ ts = sfDateTimeToolkit :: now ( ) ; // variables for computation $ month = date ( 'm' , $ ts ) ; $ quarter = ceil ( $ month / 3 ) - 1 ; // zero based quarter return sfTime :: subtractMonth ( sfTime :: firstDayOfMonth ( $ ts ) , $ month - ( $ quarter * 3 ) - 1 ) ; }
Returns the timestamp for first day of thequarter for the given date.

NOTE: Computes the quarter as:
<code>
$quarter = ceil(date('m', $ts) / 3); // 1 - 4
</code>

@param	timestamp
@return	timestamp
Returns the timestamp for first day of thequarter for the given date .