Index: trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 9700)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 9701)
@@ -39,4 +39,5 @@
 import org.openstreetmap.josm.tools.Geometry;
 import org.openstreetmap.josm.tools.Predicate;
+import org.openstreetmap.josm.tools.UncheckedParseException;
 import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.date.DateUtils;
@@ -177,8 +178,18 @@
                             String rangeA1 = rangeA[0].trim();
                             String rangeA2 = rangeA[1].trim();
-                            // if min timestap is empty: use lowest possible date
-                            long minDate = DateUtils.fromString(rangeA1.isEmpty() ? "1980" : rangeA1).getTime();
-                            // if max timestamp is empty: use "now"
-                            long maxDate = rangeA2.isEmpty() ? System.currentTimeMillis() : DateUtils.fromString(rangeA2).getTime();
+                            final long minDate;
+                            final long maxDate;
+                            try {
+                                // if min timestap is empty: use lowest possible date
+                                minDate = DateUtils.fromString(rangeA1.isEmpty() ? "1980" : rangeA1).getTime();
+                            } catch (UncheckedParseException ex) {
+                                throw new ParseError(tr("Cannot parse timestamp ''{0}''", rangeA1), ex);
+                            }
+                            try {
+                                // if max timestamp is empty: use "now"
+                                maxDate = rangeA2.isEmpty() ? System.currentTimeMillis() : DateUtils.fromString(rangeA2).getTime();
+                            } catch (UncheckedParseException ex) {
+                                throw new ParseError(tr("Cannot parse timestamp ''{0}''", rangeA2), ex);
+                            }
                             return new TimestampRange(minDate, maxDate);
                         } else {
Index: trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 9700)
+++ trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 9701)
@@ -24,4 +24,5 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.WayData;
+import org.openstreetmap.josm.tools.date.DateUtils;
 
 /**
@@ -381,6 +382,9 @@
     }
 
-    @Test
-    public void testFooTypeBar() throws Exception {
+    /**
+     * Compiles "foo type bar" and tests the parse error message
+     */
+    @Test
+    public void testFooTypeBar() {
         try {
             SearchCompiler.compile("foo type bar");
@@ -390,3 +394,17 @@
         }
     }
+
+    /**
+     * Search for primitive timestamps.
+     * @throws ParseError if an error has been encountered while compiling
+     */
+    @Test
+    public void testTimestamp() throws ParseError {
+        final Match search = SearchCompiler.compile("timestamp:2010/2011");
+        final Node n1 = new Node();
+        n1.setTimestamp(DateUtils.fromString("2010-01-22"));
+        assertTrue(search.match(n1));
+        n1.setTimestamp(DateUtils.fromString("2016-01-22"));
+        assertFalse(search.match(n1));
+    }
 }
