8 public class DateToMapAdapter extends AbstractMap {
11 public DateToMapAdapter(Date aDate) {
15 public Object get(Object aKey) {
16 if (aKey instanceof String) {
18 // ML: quick fix to allow for the dc encoding now...
19 if (((String) aKey).equals("dc")) {
20 GregorianCalendar calendar = new GregorianCalendar();
21 calendar.setTime(date);
22 return StringUtil.date2w3DateTime(calendar);
25 return new SimpleDateFormat((String) aKey).format(date);
28 throw new RuntimeException( "Can't format date with format " + (String) aKey + ": " + t.getMessage());
34 public Set entrySet() {