Changeset 8374 in josm for trunk/src/org/openstreetmap/josm/tools/date
- Timestamp:
- 2015-05-17T02:56:15+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
r8322 r8374 151 151 * @since 7299 152 152 */ 153 public static finalSimpleDateFormat newIsoDateFormat() {153 public static SimpleDateFormat newIsoDateFormat() { 154 154 return new SimpleDateFormat("yyyy-MM-dd"); 155 155 } … … 160 160 * @since 7299 161 161 */ 162 public static finalSimpleDateFormat newIsoDateTimeFormat() {162 public static SimpleDateFormat newIsoDateTimeFormat() { 163 163 return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX"); 164 164 } … … 169 169 * @since 7299 170 170 */ 171 public static finalSimpleDateFormat newOsmApiDateTimeFormat() {171 public static SimpleDateFormat newOsmApiDateTimeFormat() { 172 172 // Example: "2010-09-07 14:39:41 UTC". 173 173 // Always parsed with US locale regardless of the current locale in JOSM … … 181 181 * @since 7299 182 182 */ 183 public static finalDateFormat getDateFormat(int dateStyle) {183 public static DateFormat getDateFormat(int dateStyle) { 184 184 if (PROP_ISO_DATES.get()) { 185 185 return newIsoDateFormat(); … … 196 196 * @since 7299 197 197 */ 198 public static finalString formatDate(Date date, int dateStyle) {198 public static String formatDate(Date date, int dateStyle) { 199 199 CheckParameterUtil.ensureParameterNotNull(date, "date"); 200 200 return getDateFormat(dateStyle).format(date); … … 207 207 * @since 7299 208 208 */ 209 public static finalDateFormat getTimeFormat(int timeStyle) {209 public static DateFormat getTimeFormat(int timeStyle) { 210 210 if (PROP_ISO_DATES.get()) { 211 211 // This is not strictly conform to ISO 8601. We just want to avoid US-style times such as 3.30pm … … 222 222 * @since 7299 223 223 */ 224 public static finalString formatTime(Date time, int timeStyle) {224 public static String formatTime(Date time, int timeStyle) { 225 225 CheckParameterUtil.ensureParameterNotNull(time, "time"); 226 226 return getTimeFormat(timeStyle).format(time); … … 234 234 * @since 7299 235 235 */ 236 public static finalDateFormat getDateTimeFormat(int dateStyle, int timeStyle) {236 public static DateFormat getDateTimeFormat(int dateStyle, int timeStyle) { 237 237 if (PROP_ISO_DATES.get()) { 238 238 // This is not strictly conform to ISO 8601. We just want to avoid US-style times such as 3.30pm … … 252 252 * @since 7299 253 253 */ 254 public static finalString formatDateTime(Date datetime, int dateStyle, int timeStyle) {254 public static String formatDateTime(Date datetime, int dateStyle, int timeStyle) { 255 255 CheckParameterUtil.ensureParameterNotNull(datetime, "datetime"); 256 256 return getDateTimeFormat(dateStyle, timeStyle).format(datetime);
Note:
See TracChangeset
for help on using the changeset viewer.