List of usage examples for org.joda.time.format ISODateTimeFormat yearMonthDay
public static DateTimeFormatter yearMonthDay()
From source file:org.sakaiproject.tool.assessment.ui.listener.util.TimeUtil.java
License:Educational Community License
public String getIsoDateWithLocalTime(Date dateToConvert) { DateTime dt = new DateTime(dateToConvert); DateTimeFormatter fmt = ISODateTimeFormat.yearMonthDay(); DateTimeFormatter localFmt = fmt.withLocale(new ResourceLoader().getLocale()); DateTimeFormatter fmtTime = DateTimeFormat.shortTime(); DateTimeFormatter localFmtTime = fmtTime.withLocale(new ResourceLoader().getLocale()); return dt.toString(localFmt) + " " + dt.toString(localFmtTime); }