Changeset 10133 in josm for trunk/src/org
- Timestamp:
- 2016-04-10T13:37:15+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
r9997 r10133 30 30 public final class DateUtils { 31 31 32 pr ivateDateUtils() {32 protected DateUtils() { 33 33 // Hide default constructor for utils classes 34 34 } … … 170 170 171 171 private static boolean checkLayout(String text, String pattern) { 172 if (text.length() != pattern.length()) return false; 172 if (text.length() != pattern.length()) 173 return false; 173 174 for (int i = 0; i < pattern.length(); i++) { 174 175 char pc = pattern.charAt(i); 175 176 char tc = text.charAt(i); 176 if (pc == 'x' && tc >= '0' && tc <= '9') continue; 177 else if (pc == 'x' || pc != tc) return false; 177 if (pc == 'x' && Character.isDigit(tc)) 178 continue; 179 else if (pc == 'x' || pc != tc) 180 return false; 178 181 } 179 182 return true;
Note:
See TracChangeset
for help on using the changeset viewer.