0
I intend to get the current month and for that I am using the following code:
Calendar calendar = Calendar.getInstance();
String mes = calendar.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.ENGLISH);
The problem is that for example now instead of returning me April
is giving me back March
.
Can someone help me figure out what I’m putting wrong in getDisplayName
?
Have you even tested the
SimpleDateFormat
with theLocale
? I think this question might help you: http://stackoverflow.com/questions/1661325/simpledateformat-and-locale-based-format-string.– Wakim
@Wakim, I only use Locale to put the month in English.
– porthfind
The date of the system is correct?
– ramaral
@ramaral, yes that’s correct
– porthfind