1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Nowtime(time){
var y=60*60*24*30*12,m=60*60*24*30,d=60*60*24,h=60*60,mm=60; var Y =Math.floor(time/y); var M = Math.floor(time/m)-(Y*m); M=M<10?"0"+M:M; var D = Math.floor(time/d)-(((Y*m*d)+(M*d))); D=D<10?"0"+D:D; var H =Math.floor(time/h)-(((Y*m*d*h)+(M*d*h)+(D*h))); H=H<10?"0"+H:H; var Mm = Math.floor(time/mm)-(((Y*m*d*h*mm)+(M*d*h*mm)+(D*h*mm)+(H*mm))); Mm=Mm<10?"0"+Mm:Mm; var S = time%mm; S=S<10?"0"+S:S; var data=Y +"年"+ M+"月" + D +"日" + H +":" + Mm +":" + S; return data; },
|