(String value)
| 57 | } |
| 58 | |
| 59 | private static Date getDate(String value) |
| 60 | { |
| 61 | DateFormat df = new SimpleDateFormat("yyyy-MM", Locale.ROOT); //$NON-NLS-1$ |
| 62 | Date theDate; |
| 63 | try |
| 64 | { |
| 65 | theDate = df.parse(value); |
| 66 | } |
| 67 | catch (ParseException pe) |
| 68 | { |
| 69 | df = DateFormat.getDateInstance(); |
| 70 | try |
| 71 | { |
| 72 | theDate = df.parse(value); |
| 73 | } |
| 74 | catch (ParseException e) |
| 75 | { |
| 76 | try |
| 77 | { |
| 78 | DateFormat formatter = new SimpleDateFormat("E MMM dd HH:mm:ss Z yyyy", Locale.ROOT); |
| 79 | theDate = formatter.parse(value); |
| 80 | } |
| 81 | catch (ParseException ipe) |
| 82 | { |
| 83 | Logging.log(Logging.LST_ERROR, "Error parsing date", ipe); |
| 84 | return null; |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | return theDate; |
| 89 | } |
| 90 | |
| 91 | @Override |
| 92 | public String[] unparse(LoadContext context, CDOMObject obj) |
no test coverage detected