mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-17 18:41:37 +01:00
Clean and add comments
This commit is contained in:
parent
dd08171f46
commit
94fc76e179
1 changed files with 7 additions and 7 deletions
|
@ -18,13 +18,12 @@ class UtilDate {
|
|||
|
||||
/**
|
||||
* @param aDate anydate
|
||||
* @return date the same date as input but at noon (12:00:00)
|
||||
* <p>
|
||||
* @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
|
||||
* <p>
|
||||
* 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
|
||||
* <p>
|
||||
* 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
|
||||
* <p>
|
||||
* 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
|
||||
* <p>
|
||||
* 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();
|
||||
|
|
Loading…
Reference in a new issue