add devatools
This commit is contained in:
@@ -55,6 +55,14 @@ public final class TimeUtils {
|
||||
throw new UnsupportedOperationException("u can't instantiate me...");
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
public static String formatYMD(long time){
|
||||
Date date = new Date(time);
|
||||
String strDateFormat = "yyyy-MM-dd";
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
|
||||
return sdf.format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Milliseconds to the formatted time string.
|
||||
* <p>The pattern is {@code yyyy-MM-dd HH:mm:ss}.</p>
|
||||
|
||||
Reference in New Issue
Block a user