diff --git a/date_php4/date_php4_calc.inc b/date_php4/date_php4_calc.inc
index d60d463..56c893b 100644
--- a/date_php4/date_php4_calc.inc
+++ b/date_php4/date_php4_calc.inc
@@ -586,7 +586,7 @@ function date_calc_get_month_from_fullname($month) {
   $month = strtolower($month);
   $months = date_month_names();
   while (list($id, $name) = each($months)) {
-    if (ereg($month, strtolower($name))) {
+    if (preg_match("/$month/", strtolower($name))) {
       return $id;
     }
   }
