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

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

Location:
trunk/src/org/openstreetmap/josm/gui/history
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r7025 r7299  
    4646import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    4747import org.openstreetmap.josm.tools.CheckParameterUtil;
     48import org.openstreetmap.josm.tools.date.DateUtils;
    4849
    4950/**
     
    430431                HistoryOsmPrimitive p3 = getPrimitive(row);
    431432                if (p3 != null && p3.getTimestamp() != null)
    432                     return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(p3.getTimestamp());
     433                    return DateUtils.formatDateTime(p3.getTimestamp(), DateFormat.SHORT, DateFormat.SHORT);
    433434                return null;
    434435            case 4:
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r6865 r7299  
    3232import org.openstreetmap.josm.tools.GBC;
    3333import org.openstreetmap.josm.tools.Utils;
     34import org.openstreetmap.josm.tools.date.DateUtils;
    3435
    3536/**
    3637 * VersionInfoPanel is an UI component which displays the basic properties of a version
    3738 * of a {@link OsmPrimitive}.
    38  *
     39 * @since 1709
    3940 */
    4041public class VersionInfoPanel extends JPanel implements Observer{
     
    130131            String date = "?";
    131132            if (primitive.getTimestamp() != null) {
    132                 date = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(primitive.getTimestamp());
     133                date = DateUtils.formatDateTime(primitive.getTimestamp(), DateFormat.SHORT, DateFormat.SHORT);
    133134            }
    134135            text = tr(
     
    221222        updateText(cs, "source", lblChangesetSource, lblSource, oppCs, pnlChangesetSource);
    222223    }
    223    
     224
    224225    protected static void updateText(Changeset cs, String attr, JTextArea textArea, JLabel label, Changeset oppCs, JComponent container) {
    225226        final String text = cs != null ? cs.get(attr) : null;
Note: See TracChangeset for help on using the changeset viewer.