Index: trunk/src/org/openstreetmap/josm/tools/date/FallbackDateParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/date/FallbackDateParser.java	(revision 9394)
+++ 	(revision )
@@ -1,113 +1,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.tools.date;
-
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.openstreetmap.josm.Main;
-
-/**
- * Handles a number of different date formats encountered in OSM. This is built
- * based on similar code in JOSM. This class is not threadsafe, a separate
- * instance must be created per thread.
- *
- * @author Brett Henderson
- */
-class FallbackDateParser {
-
-    private static final String[] formats = {
-        "yyyy-MM-dd'T'HH:mm:ss'Z'",
-        "yyyy-MM-dd'T'HH:mm:ssZ",
-        "yyyy-MM-dd'T'HH:mm:ss",
-        "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
-        "yyyy-MM-dd'T'HH:mm:ss.SSSZ",
-        "yyyy-MM-dd HH:mm:ss",
-        "MM/dd/yyyy HH:mm:ss",
-        "MM/dd/yyyy'T'HH:mm:ss.SSS'Z'",
-        "MM/dd/yyyy'T'HH:mm:ss.SSSZ",
-        "MM/dd/yyyy'T'HH:mm:ss.SSS",
-        "MM/dd/yyyy'T'HH:mm:ssZ",
-        "MM/dd/yyyy'T'HH:mm:ss",
-        "yyyy:MM:dd HH:mm:ss"
-    };
-
-    private final List<DateFormat> dateParsers;
-    private int activeDateParser;
-
-    /**
-     * Creates a new instance.
-     */
-    FallbackDateParser() {
-        // Build a list of candidate date parsers.
-        dateParsers = new ArrayList<>(formats.length);
-        for (String format : formats) {
-            dateParsers.add(new SimpleDateFormat(format));
-        }
-
-        // We haven't selected a date parser yet.
-        activeDateParser = -1;
-    }
-
-    /**
-     * Attempts to parse the specified date.
-     *
-     * @param date
-     *            The date to parse.
-     * @return The date.
-     * @throws ParseException
-     *             Occurs if the date does not match any of the supported date
-     *             formats.
-     */
-    public Date parse(String date) throws ParseException {
-        String correctedDate;
-
-        // Try to fix ruby's broken xmlschema - format
-        // Replace this:
-        // 2007-02-12T18:43:01+00:00
-        // With this:
-        // 2007-02-12T18:43:01+0000
-        if (date.length() == 25 && date.charAt(22) == ':') {
-            correctedDate = date.substring(0, 22) + date.substring(23, 25);
-        } else {
-            correctedDate = date;
-        }
-
-        // If we have previously successfully used a date parser, we'll try it
-        // first.
-        if (activeDateParser >= 0) {
-            try {
-                return dateParsers.get(activeDateParser).parse(correctedDate);
-            } catch (ParseException e) {
-                // The currently active parser didn't work, so we must clear it
-                // and find a new appropriate parser.
-                activeDateParser = -1;
-            }
-        }
-
-        // Try the date parsers one by one until a suitable format is found.
-        for (int i = 0; i < dateParsers.size(); i++) {
-            try {
-                Date result;
-
-                // Attempt to parse with the current parser, if successful we
-                // store its index for next time.
-                result = dateParsers.get(i).parse(correctedDate);
-                activeDateParser = i;
-
-                return result;
-
-            } catch (ParseException pe) {
-                // Ignore parsing errors and try the next pattern.
-                if (Main.isTraceEnabled()) {
-                    Main.trace(pe.getMessage());
-                }
-            }
-        }
-
-        throw new ParseException("The date string (" + date + ") could not be parsed.", 0);
-    }
-}
Index: trunk/src/org/openstreetmap/josm/tools/date/PrimaryDateParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/date/PrimaryDateParser.java	(revision 9394)
+++ 	(revision )
@@ -1,248 +1,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.tools.date;
-
-import java.text.ParseException;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.TimeZone;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-
-/**
- * Handles a number of different date formats encountered in OSM. This is built
- * based on similar code in JOSM. This class is not threadsafe, a separate
- * instance must be created per thread.
- *
- * @author Brett Henderson
- * @deprecated Use {@link DateUtils} instead!
- */
-@Deprecated
-public class PrimaryDateParser {
-    private DatatypeFactory datatypeFactory;
-    private final FallbackDateParser fallbackDateParser;
-    private final Calendar calendar;
-
-    /**
-     * Creates a new instance.
-     */
-    public PrimaryDateParser() {
-        // Build an xml data type factory.
-        try {
-            datatypeFactory = DatatypeFactory.newInstance();
-
-        } catch (DatatypeConfigurationException e) {
-            throw new RuntimeException("Unable to instantiate xml datatype factory.", e);
-        }
-
-        fallbackDateParser = new FallbackDateParser();
-
-        calendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
-    }
-
-    private static boolean isDateInShortStandardFormat(String date) {
-        // We can only parse the date if it is in a very specific format.
-        // eg. 2007-09-23T08:25:43Z
-
-        if (date.length() != 20) {
-            return false;
-        }
-
-        char[] dateChars = date.toCharArray();
-
-        // Make sure any fixed characters are in the correct place.
-        if (dateChars[4] != '-') {
-            return false;
-        }
-        if (dateChars[7] != '-') {
-            return false;
-        }
-        if (dateChars[10] != 'T') {
-            return false;
-        }
-        if (dateChars[13] != ':') {
-            return false;
-        }
-        if (dateChars[16] != ':') {
-            return false;
-        }
-        if (dateChars[19] != 'Z') {
-            return false;
-        }
-
-        // Ensure all remaining characters are numbers.
-        for (int i = 0; i < 4; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-        for (int i = 5; i < 7; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-        for (int i = 8; i < 10; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-        for (int i = 11; i < 13; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-        for (int i = 14; i < 16; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-        for (int i = 17; i < 19; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-
-        // No problems found so it is in the special case format.
-        return true;
-    }
-
-    private static boolean isDateInLongStandardFormat(String date) {
-        // We can only parse the date if it is in a very specific format.
-        // eg. 2007-09-23T08:25:43.000Z
-
-        if (date.length() != 24) {
-            return false;
-        }
-
-        char[] dateChars = date.toCharArray();
-
-        // Make sure any fixed characters are in the correct place.
-        if (dateChars[4] != '-') {
-            return false;
-        }
-        if (dateChars[7] != '-') {
-            return false;
-        }
-        if (dateChars[10] != 'T') {
-            return false;
-        }
-        if (dateChars[13] != ':') {
-            return false;
-        }
-        if (dateChars[16] != ':') {
-            return false;
-        }
-        if (dateChars[19] != '.') {
-            return false;
-        }
-        if (dateChars[23] != 'Z') {
-            return false;
-        }
-
-        // Ensure all remaining characters are numbers.
-        for (int i = 0; i < 4; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-        for (int i = 5; i < 7; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-        for (int i = 8; i < 10; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-        for (int i = 11; i < 13; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-        for (int i = 14; i < 16; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-        for (int i = 17; i < 19; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-        for (int i = 20; i < 23; i++) {
-            if (dateChars[i] < '0' || dateChars[i] > '9') {
-                return false;
-            }
-        }
-
-        // No problems found so it is in the special case format.
-        return true;
-    }
-
-    private Date parseShortStandardDate(String date) {
-        int year = Integer.parseInt(date.substring(0, 4));
-        int month = Integer.parseInt(date.substring(5, 7));
-        int day = Integer.parseInt(date.substring(8, 10));
-        int hour = Integer.parseInt(date.substring(11, 13));
-        int minute = Integer.parseInt(date.substring(14, 16));
-        int second = Integer.parseInt(date.substring(17, 19));
-
-        calendar.clear();
-        calendar.set(Calendar.YEAR, year);
-        calendar.set(Calendar.MONTH, month - 1);
-        calendar.set(Calendar.DAY_OF_MONTH, day);
-        calendar.set(Calendar.HOUR_OF_DAY, hour);
-        calendar.set(Calendar.MINUTE, minute);
-        calendar.set(Calendar.SECOND, second);
-
-        return calendar.getTime();
-    }
-
-    private Date parseLongStandardDate(String date) {
-        int year = Integer.parseInt(date.substring(0, 4));
-        int month = Integer.parseInt(date.substring(5, 7));
-        int day = Integer.parseInt(date.substring(8, 10));
-        int hour = Integer.parseInt(date.substring(11, 13));
-        int minute = Integer.parseInt(date.substring(14, 16));
-        int second = Integer.parseInt(date.substring(17, 19));
-        int millisecond = Integer.parseInt(date.substring(20, 23));
-
-        calendar.clear();
-        calendar.set(Calendar.YEAR, year);
-        calendar.set(Calendar.MONTH, month - 1);
-        calendar.set(Calendar.DAY_OF_MONTH, day);
-        calendar.set(Calendar.HOUR_OF_DAY, hour);
-        calendar.set(Calendar.MINUTE, minute);
-        calendar.set(Calendar.SECOND, second);
-        calendar.set(Calendar.MILLISECOND, millisecond);
-
-        return calendar.getTime();
-    }
-
-    /**
-     * Attempts to parse the specified date.
-     *
-     * @param date
-     *            The date to parse.
-     * @return The date.
-     * @throws ParseException
-     *             Occurs if the date does not match any of the supported date
-     *             formats.
-     */
-    public Date parse(String date) throws ParseException {
-        try {
-            if (isDateInShortStandardFormat(date)) {
-                return parseShortStandardDate(date);
-            } else if (isDateInLongStandardFormat(date)) {
-                return parseLongStandardDate(date);
-            } else {
-                return datatypeFactory.newXMLGregorianCalendar(date).toGregorianCalendar().getTime();
-            }
-
-        } catch (IllegalArgumentException e) {
-            return fallbackDateParser.parse(date);
-        }
-    }
-}
