public static String getS(int num){ String res = null; String s1 = null; String s2 = null; String s3 = null; String s4 = null; int s = num%60; int m = num/60%60; int h = num/60/60; if(h>4) s1 = "pm"; else s1 = "am"; int h1 = 8+h; if(h1/10 >= 1) s2 = ""+h1; else s2 = "0"+h1; if(m/10 >= 1) s3 = ""+m; else s3 = "0"+m; if(s/10 >=1) s4 = ""+s; else s4 = "0"+s; res = s2+":"+s3+":"+s4+" "+s1; return res; }
点赞 评论

相关推荐

牛客网
牛客企业服务