summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bcc14e1)
raw | patch | inline | side by side (parent: bcc14e1)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Jan 2010 15:16:43 +0000 (15:16 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Jan 2010 15:16:43 +0000 (15:16 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15209 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/utils/class_tests.inc | patch | blob | history |
index cfd7f255b9188527c1d8a0104a44d6a77688a10a..6ceba9b137c30bdea766e97a28b2d431e15b51fa 100644 (file)
}
#TODO: use $lang to check date format
- return preg_match("/[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{4}/", $date);
+ if (!preg_match("/([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{4})/", $date, $matches)) {
+ return false;
+ }
+
+ return checkdate($matches[1],$matches[2],$matches[3]);
}
/* Check if the specified IP address $address is inside the given network */