mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-10 07:51:20 +01:00
Ajout méthode tomorrowAtNoon en milliseconde
This commit is contained in:
parent
11d54c36d2
commit
37468beb9e
1 changed files with 17 additions and 0 deletions
|
@ -91,4 +91,21 @@ public class UtilDate {
|
||||||
|
|
||||||
return (int) (todayDate.getTime() - oldDate.getTime());
|
return (int) (todayDate.getTime() - oldDate.getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param: none
|
||||||
|
* return int
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static long tomorrowAtNoon() {
|
||||||
|
Date now = new Date();
|
||||||
|
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(now);
|
||||||
|
calendar.add(Calendar.DAY_OF_YEAR,1);
|
||||||
|
Date tomorrowAtNoon = dateAtNoon(calendar.getTime());
|
||||||
|
|
||||||
|
long millis = tomorrowAtNoon.getTime() - now.getTime();
|
||||||
|
return millis;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue