Created
September 14, 2011 08:14
-
-
Save nexeck/1216085 to your computer and use it in GitHub Desktop.
Kohana Valid Date Less Than
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Kleiner Als Methode | |
* | |
* @static | |
* @param $validation | |
* @param $field1 | |
* @param $field2 | |
* @param $field2_name string Wird für den Fehlertext benutzt, und sollte die Bezeichnung des Feld1 beinhalten | |
* @return bool | |
*/ | |
public static function date_less_than($validation, $field1, $field2, $field2_name) | |
{ | |
$date1 = new DateTime($validation[$field1]); | |
$date2 = new DateTime($validation[$field2]); | |
return ($date1 < $date2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment