I have a class that extends Calendar for supporting Jalali calendar.
Currently I’m using this for formating date and time:
com.ibm.icu.text.DateFormat df = cal.getDateTimeFormat(DateFormat.DEFAULT, DateFormat.DEFAULT,new com.ibm.icu.util.ULocale("fa", "IR", ""));
But this gives date like: 1390/09/29 17:22:10
But i need something like: 90/09/29 17:22
How can I do this without using SimpleDateFormat?
Thanks
getDateTimeFormat()is not a method inCalendar, so that means it’s implemented in whateverCalendarsubclass you’re using. I would expect one of the following to do what you want (just a guess, though!):That is: try passing
DateFormat.MEDIUMorDateFormat.SHORTinstead ofDateFormat.DEFAULT.