Do i need to be worried about this warning? What if I ignore the warning?
What does this warning mean:
To get local formatting use getDateInstance(), getDateTimeInstance(), or getTimeInstance(), or use new SimpleDateFormat(String template, Locale locale) with for example Locale.US for ASCII dates.
In the 2nd Line of the code below. The App is working fine with the code. I wanted to show date eg, 19 Nov 2014.
public static String getFormattedDate(long calendarTimeInMilliseconds) {
SimpleDateFormat sdfDate = new SimpleDateFormat("d MMM yyyy"); //ON THIS LINE
Date now = new Date();
now.setTime(calendarTimeInMilliseconds);
String strDate = sdfDate.format(now);
return strDate;
}
I think this is a correct way to format date as shown here.