diff --git a/app/src/main/java/net/foucry/pilldroid/UtilDate.java b/app/src/main/java/net/foucry/pilldroid/UtilDate.java index 28dd297..8c6d968 100644 --- a/app/src/main/java/net/foucry/pilldroid/UtilDate.java +++ b/app/src/main/java/net/foucry/pilldroid/UtilDate.java @@ -18,13 +18,12 @@ class UtilDate { /** * @param aDate anydate - * @return date the same date as input but at noon (12:00:00) - *

+ * @return date the same date as input but at noon (12:00:00 PM) * set date time at Noon */ static Date dateAtNoon(Date aDate) { -// Log.d(TAG, "dateAtNoon " + aDate); + Log.d(TAG, "dateAtNoon " + aDate); Calendar calendar = Calendar.getInstance(); calendar.setTime(aDate); @@ -39,7 +38,6 @@ class UtilDate { * @param days number of days to remove to the ate * @param date date before day removing * @return date - *

* Substract days to date and return a new date */ static Date removeDaysToDate(int days, Date date) { @@ -53,7 +51,6 @@ class UtilDate { /** * @param date Date to be converted * @return String of the converted date - *

* Convert a date to a String using a SimpleDateFormat */ static String date2String(Date date, DateFormat dateFormat) { @@ -69,7 +66,6 @@ class UtilDate { /** * @param dateString string representing a Date to be converted * @return date Date after conversion - *

* Convert String date into Date */ static Date string2Date(String dateString) { @@ -81,7 +77,6 @@ class UtilDate { /** * @param date start date * @return int numbers of days between date and today - *

* Number of days between date (older than today) and today */ static int nbOfDaysBetweenDateAndToday(Date date) { @@ -91,6 +86,11 @@ class UtilDate { return (int) (todayDate.getTime() - oldDate.getTime()); } + /** + * Convert dateInMilliseconds into string formated date + * @param dateInMilliseconds long + * @return formatted Date String + */ static String convertDate(long dateInMilliseconds) { DateFormat formatter = new SimpleDateFormat("dd/MM/yy HH:mm:ss", Locale.FRANCE); Calendar calendar = Calendar.getInstance();