function timeStamp( second_time ){
var time = parseInt(second_time) + "秒";
if( parseInt(second_time )> 60){
var second = parseInt(second_time) % 60;
var min = parseInt(second_time / 60);
time = min + "分" + second + "秒";
if( min > 60 ){
min = parseInt(second_time / 60) % 60;
var hour = parseInt( parseInt(second_time / 60) /60 );
time = hour + "小时" + min + "分" + second + "秒";
if( hour > 24 ){
hour = parseInt( parseInt(second_time / 60) /60 ) % 24;
var day = parseInt( parseInt( parseInt(second_time / 60) /60 ) / 24 );
time = day + "天" + hour + "小时" + min + "分" + second + "秒";
if( day > 24 ){
day = parseInt( parseInt(parseInt(second_time / 60) /60 ) / 24 ) % 30;
var month = parseInt( parseInt( parseInt( parseInt(second_time / 60) /60 ) / 24 ) / 30);
time = month + "月" + day + "天" + hour + "小时" + min + "分" + second + "秒";
if( month > 12 ){
month = parseInt( parseInt( parseInt( parseInt(second_time / 60) /60 ) / 24 ) / 30 ) % 12;
var year = parseInt( parseInt( parseInt( parseInt( parseInt(second_time / 60) /60 ) / 24 ) / 30) / 12);
time = year + "年" + month + "月" + day + "天" + hour + "小时" + min + "分" + second + "秒";
}
}
}
}
}
return time;
}
alert(timeStamp(5154000))