Skip to content
Snippets Groups Projects
Commit ee360542 authored by Daniel Micay's avatar Daniel Micay
Browse files

minor cleanup

parent e967af23
No related branches found
No related tags found
No related merge requests found
......@@ -39,14 +39,13 @@ public class Utils {
final Calendar calendar = Calendar.getInstance();
final int currentYear = calendar.get(Calendar.YEAR);
int year;
// Year is required
String field = date.substring(position += 2, 6);
if (!TextUtils.isDigitsOnly(field)) {
throw new ParseException("Invalid year", position);
}
year = Integer.parseInt(field);
int year = Integer.parseInt(field);
if (year > currentYear) {
year = currentYear;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment