I am using this method to set time to the calendar but when I want to get month it'll give me month-1.
For example when I set "2017-12-27 10:50:00". And when I want to get the month of the calendar it's 11 instead of 12.
public String setDate(String gDate){
try {
private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = sdf.parse(gDate);
javaCalendar.setTime(date);
} catch (ParseException e) {
e.printStackTrace();
Log.i("LOG_DATE", "Error is: " + e.toString());
}
return "";
}