Changeset 18013 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2021-07-13T23:40:33+02:00 (3 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools/date
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
r17987 r18013 262 262 263 263 /** 264 * Returns a new {@code SimpleDateFormat} for date and time, according to <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a>.265 * @return a new ISO 8601 date format, for date and time.266 * @since 7299267 * @deprecated Use {@link Instant#toString()}268 */269 @Deprecated270 public static SimpleDateFormat newIsoDateTimeFormat() {271 return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX");272 }273 274 /**275 264 * Returns the date format to be used for current user, based on user preferences. 276 265 * @param dateStyle The date style as described in {@link DateFormat#getDateInstance}. Ignored if "ISO dates" option is set … … 296 285 : DateTimeFormatter.ofLocalizedDate(dateStyle); 297 286 return formatter.withZone(ZoneId.systemDefault()); 298 }299 300 /**301 * Returns the date format used for GPX waypoints.302 * @return the date format used for GPX waypoints303 * @since 14055304 * @deprecated Use {@link Instant#toString()}305 */306 @Deprecated307 public static DateFormat getGpxFormat() {308 SimpleDateFormat result = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");309 result.setTimeZone(UTC);310 return result;311 287 } 312 288 -
trunk/src/org/openstreetmap/josm/tools/date/Interval.java
r17845 r18013 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.tools.date; 3 4 import org.openstreetmap.josm.tools.Utils;5 3 6 4 import java.time.Instant; … … 8 6 import java.time.format.FormatStyle; 9 7 import java.util.Objects; 8 9 import org.openstreetmap.josm.tools.Utils; 10 10 11 11 /** … … 17 17 private final Instant end; 18 18 19 /** 20 * Constructs a new {@code Interval} 21 * @param start start instant 22 * @param end end instant 23 */ 19 24 public Interval(Instant start, Instant end) { 20 25 this.start = start; … … 54 59 } 55 60 61 /** 62 * Returns start instant. 63 * @return start instant 64 */ 56 65 public Instant getStart() { 57 66 return start; 58 67 } 59 68 69 /** 70 * Returns end instant. 71 * @return end instant 72 */ 60 73 public Instant getEnd() { 61 74 return end;
Note:
See TracChangeset
for help on using the changeset viewer.