Index: trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java	(revision 17113)
+++ trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java	(revision 17114)
@@ -68,9 +68,11 @@
     public static long tsFromString(String str) {
         // "2007-07-25T09:26:24{Z|{+|-}01[:00]}"
-        if (checkLayout(str, "xxxx-xx-xx")) {
+        if (checkLayout(str, "xxxx-xx-xx") ||
+                checkLayout(str, "xxxx-xx") ||
+                checkLayout(str, "xxxx")) {
             final ZonedDateTime local = ZonedDateTime.of(
                     parsePart4(str, 0),
-                    parsePart2(str, 5),
-                    parsePart2(str, 8),
+                    str.length() > 5 ? parsePart2(str, 5) : 1,
+                    str.length() > 8 ? parsePart2(str, 8) : 1,
                     0, 0, 0, 0, ZoneOffset.UTC);
             return local.toInstant().toEpochMilli();
@@ -129,5 +131,5 @@
         try {
             // slow path for fractional seconds different from millisecond precision
-            return Instant.parse(str).toEpochMilli();
+            return ZonedDateTime.parse(str).toInstant().toEpochMilli();
         } catch (IllegalArgumentException | DateTimeParseException ex) {
             throw new UncheckedParseException("The date string (" + str + ") could not be parsed.", ex);
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 17113)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 17114)
@@ -432,10 +432,13 @@
     @Test
     public void testTimestamp() throws SearchParseError {
-        final Match search = SearchCompiler.compile("timestamp:2010/2011");
         final Node n1 = new Node();
         n1.setTimestamp(DateUtils.fromString("2010-01-22"));
-        assertTrue(search.match(n1));
+        assertTrue(SearchCompiler.compile("timestamp:2010/2011").match(n1));
+        assertTrue(SearchCompiler.compile("timestamp:2010-01/2011").match(n1));
+        assertTrue(SearchCompiler.compile("timestamp:2010-01-22/2011").match(n1));
+        assertFalse(SearchCompiler.compile("timestamp:2010-01-23/2011").match(n1));
+        assertFalse(SearchCompiler.compile("timestamp:2010/2010-01-21").match(n1));
         n1.setTimestamp(DateUtils.fromString("2016-01-22"));
-        assertFalse(search.match(n1));
+        assertFalse(SearchCompiler.compile("timestamp:2010/2011").match(n1));
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 17113)
+++ trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 17114)
@@ -96,4 +96,8 @@
         assertEquals(851042397000L, DateUtils.fromString("1996-12-19T16:39:57-08:00").getTime());
         assertEquals(-1041337172130L, DateUtils.fromString("1937-01-01T12:00:27.87+00:20").getTime());
+        // (partial) dates
+        assertEquals(482112000000L, DateUtils.fromString("1985-04-12").getTime());
+        assertEquals(481161600000L, DateUtils.fromString("1985-04").getTime());
+        assertEquals(473385600000L, DateUtils.fromString("1985").getTime());
     }
 
