[Modify]免费礼物功能开发

This commit is contained in:
wushaocheng
2022-12-14 20:08:08 +08:00
parent 37e32e433f
commit 7a852cf35d
22 changed files with 456 additions and 9 deletions

View File

@@ -380,11 +380,30 @@ public class TimeUtils {
return builder.toString();
}
public static String getProgresstime(long progress) {
if (progress < 0) progress = 0;
Date date = new Date(progress);
SimpleDateFormat format = new SimpleDateFormat("mm:ss");
return format.format(date);
public static String timeConversion(int time) {
int hour = 0;
int minutes = 0;
int sencond = 0;
int temp = time % 3600;
if (time > 3600) {
hour = time / 3600;
if (temp != 0) {
if (temp > 60) {
minutes = temp / 60;
if (temp % 60 != 0) {
sencond = temp % 60;
}
} else {
sencond = temp;
}
}
} else {
minutes = time / 60;
if (time % 60 != 0) {
sencond = time % 60;
}
}
return (hour<10?("0"+hour):hour) + ":" + (minutes<10?("0"+minutes):minutes) + ":" + (sencond<10?("0"+sencond):sencond);
}
public static String getChineseMonth(Context context, long millis) {