[Modify]修改免费礼物逻辑
This commit is contained in:
@@ -380,11 +380,11 @@ public class TimeUtils {
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
public static String timeConversion(int time) {
|
||||
int hour = 0;
|
||||
int minutes = 0;
|
||||
int sencond = 0;
|
||||
int temp = time % 3600;
|
||||
public static String timeConversion(long time) {
|
||||
long hour = 0;
|
||||
long minutes = 0;
|
||||
long sencond = 0;
|
||||
long temp = time % 3600;
|
||||
if (time > 3600) {
|
||||
hour = time / 3600;
|
||||
if (temp != 0) {
|
||||
@@ -406,6 +406,19 @@ public class TimeUtils {
|
||||
return (hour<10?("0"+hour):hour) + ":" + (minutes<10?("0"+minutes):minutes) + ":" + (sencond<10?("0"+sencond):sencond);
|
||||
}
|
||||
|
||||
public static String secondsToTime(long seconds){
|
||||
long h=seconds/3600; //小时
|
||||
long m=(seconds%3600)/60; //分钟
|
||||
long s=(seconds%3600)%60; //秒
|
||||
if(h>0){
|
||||
return h+"小時"+m+"分鐘"+s+"秒";
|
||||
}
|
||||
if(m>0){
|
||||
return m+"分鐘"+s+"秒";
|
||||
}
|
||||
return s+"秒";
|
||||
}
|
||||
|
||||
public static String getChineseMonth(Context context, long millis) {
|
||||
int month = getMonth(millis);
|
||||
String[] monthStrs = context.getResources().getStringArray(R.array.time_month_strs);
|
||||
|
Reference in New Issue
Block a user