Changeset 18013 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2021-07-13T23:40:33+02:00 (3 years ago)
Author:
Don-vip
Message:

see #14176 - remove deprecated DateUtils methods

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  
    262262
    263263    /**
    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 7299
    267      * @deprecated Use {@link Instant#toString()}
    268      */
    269     @Deprecated
    270     public static SimpleDateFormat newIsoDateTimeFormat() {
    271         return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX");
    272     }
    273 
    274     /**
    275264     * Returns the date format to be used for current user, based on user preferences.
    276265     * @param dateStyle The date style as described in {@link DateFormat#getDateInstance}. Ignored if "ISO dates" option is set
     
    296285                : DateTimeFormatter.ofLocalizedDate(dateStyle);
    297286        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 waypoints
    303      * @since 14055
    304      * @deprecated Use {@link Instant#toString()}
    305      */
    306     @Deprecated
    307     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;
    311287    }
    312288
  • trunk/src/org/openstreetmap/josm/tools/date/Interval.java

    r17845 r18013  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.tools.date;
    3 
    4 import org.openstreetmap.josm.tools.Utils;
    53
    64import java.time.Instant;
     
    86import java.time.format.FormatStyle;
    97import java.util.Objects;
     8
     9import org.openstreetmap.josm.tools.Utils;
    1010
    1111/**
     
    1717    private final Instant end;
    1818
     19    /**
     20     * Constructs a new {@code Interval}
     21     * @param start start instant
     22     * @param end end instant
     23     */
    1924    public Interval(Instant start, Instant end) {
    2025        this.start = start;
     
    5459    }
    5560
     61    /**
     62     * Returns start instant.
     63     * @return start instant
     64     */
    5665    public Instant getStart() {
    5766        return start;
    5867    }
    5968
     69    /**
     70     * Returns end instant.
     71     * @return end instant
     72     */
    6073    public Instant getEnd() {
    6174        return end;
Note: See TracChangeset for help on using the changeset viewer.