mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-10 07:51:20 +01:00
Ajout convertion date millisecondes vers date
This commit is contained in:
parent
390f620ca4
commit
f79ca8d00d
1 changed files with 7 additions and 0 deletions
|
@ -105,4 +105,11 @@ public class UtilDate {
|
|||
|
||||
return (int) (todayDate.getTime() - oldDate.getTime());
|
||||
}
|
||||
|
||||
public static String convertDate(long dateInMilliseconds) {
|
||||
DateFormat formatter = new SimpleDateFormat("YYYY/mm/dd hh:MM:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(dateInMilliseconds);
|
||||
return formatter.format(calendar.getTime());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue