diff --git a/date_api/date_api.module b/date_api/date_api.module
index 4ae632e..f0ff922 100644
--- a/date_api/date_api.module
+++ b/date_api/date_api.module
@@ -1895,7 +1895,7 @@ function date_range_years($string, $date = NULL) {
 
   // Valid patterns would be -5:+5, 0:+1, 2008:2010.
   $plus_pattern = '@[\+|\-][0-9]{1,4}@';
-  $year_pattern = '@[0-9]{4}@';
+  $year_pattern = '@^[0-9]{4}$@';
   if (!preg_match($year_pattern, $min_year, $matches)) {
     if (preg_match($plus_pattern, $min_year, $matches)) {
       $min_year = $this_year + $matches[0];
