mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-10 07:51:20 +01:00
Minors changes
This commit is contained in:
parent
dfaef8c54b
commit
078db844df
1 changed files with 4 additions and 3 deletions
|
@ -17,7 +17,7 @@ class UtilDate {
|
|||
private static final String TAG = UtilDate.class.getName();
|
||||
|
||||
/**
|
||||
* @param aDate anydate
|
||||
* @param aDate any date
|
||||
* @return date the same date as input but at noon (12:00:00 PM)
|
||||
* set date time at Noon
|
||||
*/
|
||||
|
@ -30,6 +30,7 @@ class UtilDate {
|
|||
calendar.set(Calendar.HOUR_OF_DAY, 12);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
@ -79,11 +80,11 @@ class UtilDate {
|
|||
* @return int numbers of days between date and today
|
||||
* Number of days between date (older than today) and today
|
||||
*/
|
||||
static int nbOfDaysBetweenDateAndToday(Date date) {
|
||||
static long nbOfDaysBetweenDateAndToday(Date date) {
|
||||
Date oldDate = dateAtNoon(date); // Be sure that the old date is at Noon
|
||||
Date todayDate = dateAtNoon(new Date()); // Be sure that we use today at Noon
|
||||
|
||||
return (int) (todayDate.getTime() - oldDate.getTime());
|
||||
return (todayDate.getTime() - oldDate.getTime());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue