Skip to content
Snippets Groups Projects
Commit 9cbcd3ba authored by Janak Amarasena's avatar Janak Amarasena
Browse files

Minor update according to received feedback

parent b8e562d0
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,7 @@ public class DateHelper { ...@@ -16,8 +16,7 @@ public class DateHelper {
public static long getDateDiffToCurrentDateInDays(String startDate) throws ParseException { public static long getDateDiffToCurrentDateInDays(String startDate) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat(DATE_PATTERN, Locale.US); SimpleDateFormat sdf = new SimpleDateFormat(DATE_PATTERN, Locale.US);
Date lastDate; Date lastDate = sdf.parse(startDate);
lastDate = sdf.parse(startDate);
Date currentDate = new Date(); Date currentDate = new Date();
return (currentDate.getTime() - lastDate.getTime()) / ONE_DAY; return (currentDate.getTime() - lastDate.getTime()) / ONE_DAY;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment