function getNowFormatDate() {
var date = new Date();
var seperator1 = "-";
var seperator2 = ":";
var month = date.getMonth() + 1;
var hh = date.getHours();
var mm = date.getMinutes();
var ss = date.getSeconds();
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
if (hh >= 0 && hh <= 9) {
hh = "0" + hh;
}
if (mm >= 0 && mm <= 9) {
mm = "0" + mm;
}
if (ss >= 0 && ss <= 9) {
ss = "0" + ss;
}
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
+ " " + hh + seperator2 + mm + seperator2 + ss;
$('.currentTime').html(currentdate);
return currentdate;
};
var currentTimeInt = setInterval('getNowFormatDate()',1000);
var date = new Date();
var seperator1 = "-";
var seperator2 = ":";
var month = date.getMonth() + 1;
var hh = date.getHours();
var mm = date.getMinutes();
var ss = date.getSeconds();
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
if (hh >= 0 && hh <= 9) {
hh = "0" + hh;
}
if (mm >= 0 && mm <= 9) {
mm = "0" + mm;
}
if (ss >= 0 && ss <= 9) {
ss = "0" + ss;
}
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
+ " " + hh + seperator2 + mm + seperator2 + ss;
$('.currentTime').html(currentdate);
return currentdate;
};
var currentTimeInt = setInterval('getNowFormatDate()',1000);