common/utilities/DateUtil.php
public static function lessThan( $sourceDate, $targetDate, $equal = false ) {

		$source = is_string( $sourceDate ) ? strtotime( $sourceDate ) : $sourceDate->getTimestamp();
		$test 	= is_string( $targetDate ) ? strtotime( $targetDate ) : $targetDate->getTimestamp();

		// Test less than
		if( $equal ) {

			return $test <= $source;
		}

		return $test < $source;
	}
public static function lessThan( $sourceDate, $targetDate, $equal = false ) {

		$source = is_string( $sourceDate ) ? strtotime( $sourceDate ) : $sourceDate->getTimestamp();
		$test 	= is_string( $targetDate ) ? strtotime( $targetDate ) : $targetDate->getTimestamp();

		// Test less than
		if( $equal ) {

			return $test <= $source;
		}

		return $test < $source;
	}
public static function lessThan ( $ sourceDate , $ targetDate , $ equal = false ) { $ source = is_string ( $ sourceDate ) ? strtotime ( $ sourceDate ) : $ sourceDate -> getTimestamp ( ) ; $ test = is_string ( $ targetDate ) ? strtotime ( $ targetDate ) : $ targetDate -> getTimestamp ( ) ; // Test less than if ( $ equal ) { return $ test <= $ source ; } return $ test < $ source ; }
Compare the target date with source date to check whether target date is lesser than or equal to source date.

@param type $sourceDate
@param type $targetDate
@param type $equal
@return boolean
Compare the target date with source date to check whether target date is lesser than or equal to source date .