Changeset 7299 in josm for trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
- Timestamp:
- 2014-07-09T22:15:41+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r7182 r7299 57 57 import org.openstreetmap.josm.tools.ImageProvider; 58 58 import org.openstreetmap.josm.tools.Utils; 59 import org.openstreetmap.josm.tools.date.DateUtils; 59 60 60 61 public class GpxLayer extends Layer { … … 142 143 143 144 /** 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 145 148 */ 146 149 public static String getTimespanForTrack(GpxTrack trk) { … … 148 151 String ts = ""; 149 152 if (bounds != null) { 150 DateFormat df = Date Format.getDateInstance(DateFormat.SHORT);153 DateFormat df = DateUtils.getDateFormat(DateFormat.SHORT); 151 154 String earliestDate = df.format(bounds[0]); 152 155 String latestDate = df.format(bounds[1]); 153 156 154 157 if (earliestDate.equals(latestDate)) { 155 DateFormat tf = Date Format.getTimeInstance(DateFormat.SHORT);158 DateFormat tf = DateUtils.getTimeFormat(DateFormat.SHORT); 156 159 ts += earliestDate + " "; 157 160 ts += tf.format(bounds[0]) + " - " + tf.format(bounds[1]); 158 161 } else { 159 DateFormat dtf = Date Format.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);162 DateFormat dtf = DateUtils.getDateTimeFormat(DateFormat.SHORT, DateFormat.SHORT); 160 163 ts += dtf.format(bounds[0]) + " - " + dtf.format(bounds[1]); 161 164 }
Note:
See TracChangeset
for help on using the changeset viewer.