add devatools

This commit is contained in:
zhongchao
2021-12-22 19:21:53 +08:00
parent 311e5e0af1
commit a6cd4afc6e
14 changed files with 116 additions and 54 deletions

View File

@@ -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>