Date d = new Date(); elt.setAttribute("last", new SimpleDateFormat().format(d));
Calendar c = new GregorianCalendar(UTC); elt.setAttribute("last", format(c.get(Calendar.YEAR), 4) + format(c.get(Calendar.MONTH), 2) + format(c.get(Calendar.DAY_OF_MONTH), 2) + format(c.get(Calendar.HOUR), 2) + format(c.get(Calendar.MINUTE), 2) + format(c.get(Calendar.SECOND), 2) );
  public void incNoOfTimesPlayed() {    synchronized (this) {      elt.setAttribute("played", Integer.toString(getNoOfTimesPlayed() + 1));      try {        Date d = new Date();        elt.setAttribute("last", new SimpleDateFormat().format(d));      }       catch(Exception e) {        e.printStackTrace();      }     }  }