Ignore:
Timestamp:
2014-07-09T22:15:41+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #10121 - Add a new look-and-feel preference to display ISO 8601 dates globally

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r7182 r7299  
    5757import org.openstreetmap.josm.tools.ImageProvider;
    5858import org.openstreetmap.josm.tools.Utils;
     59import org.openstreetmap.josm.tools.date.DateUtils;
    5960
    6061public class GpxLayer extends Layer {
     
    142143
    143144    /**
    144      * returns a human readable string that shows the timespan of the given track
     145     * Returns a human readable string that shows the timespan of the given track
     146     * @param trk The GPX track for which timespan is displayed
     147     * @return The timespan as a string
    145148     */
    146149    public static String getTimespanForTrack(GpxTrack trk) {
     
    148151        String ts = "";
    149152        if (bounds != null) {
    150             DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT);
     153            DateFormat df = DateUtils.getDateFormat(DateFormat.SHORT);
    151154            String earliestDate = df.format(bounds[0]);
    152155            String latestDate = df.format(bounds[1]);
    153156
    154157            if (earliestDate.equals(latestDate)) {
    155                 DateFormat tf = DateFormat.getTimeInstance(DateFormat.SHORT);
     158                DateFormat tf = DateUtils.getTimeFormat(DateFormat.SHORT);
    156159                ts += earliestDate + " ";
    157160                ts += tf.format(bounds[0]) + " - " + tf.format(bounds[1]);
    158161            } else {
    159                 DateFormat dtf = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
     162                DateFormat dtf = DateUtils.getDateTimeFormat(DateFormat.SHORT, DateFormat.SHORT);
    160163                ts += dtf.format(bounds[0]) + " - " + dtf.format(bounds[1]);
    161164            }
Note: See TracChangeset for help on using the changeset viewer.