Commit 480bfe11 authored by Nihar Thakkar's avatar Nihar Thakkar

Parse date-only events correctly

parent 12ae44c9
......@@ -72,6 +72,18 @@ public class ImportActivity extends Activity {
}
}
// ONLY DATE, e.g. 20190415
else if (iCalDateParam != null && iCalDateParam.equals("VALUE=DATE")) {
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
format.setTimeZone(TimeZone.getDefault());
try {
format.parse(iCalDate);
return format.getCalendar().getTimeInMillis();
} catch (ParseException e) {
}
}
// FORM #1: DATE WITH LOCAL TIME, e.g. 19980118T230000
else {
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd'T'HHmmss");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment