최현준

시간 부분 수정

Showing 1 changed file with 13 additions and 17 deletions
......@@ -288,20 +288,6 @@ function make_time()
var hours = today.getHours();
var minutes = today.getMinutes();
for (var i = 1; i<8; i++)
{
var temp = i+1;
if(3*i-1 <= hours && 3*temp-1 >= hours)
{
if(3*i-1<10)
value.hours = '0'+3*i-1;
else
value.hours = 3*i-1;
value.hours = 3*i-1+'00';
break;
}
}
if(minutes < 30){
// 30분보다 작으면 한시간 전 값
hours = hours - 1;
......@@ -314,9 +300,6 @@ function make_time()
hours = 23;
}
}
if(hours<10) {
hours='0'+hours
}
if(mm<10) {
mm='0'+mm
}
......@@ -325,6 +308,19 @@ function make_time()
}
today = yyyy+""+mm+""+dd;
for (var i = 0; i<9; i++)
{
var temp = i+1;
if(3*i <= hours && 3*temp >= hours)
{
if(3*temp-1<10)
value.hours = '0'+3*temp-1;
else
value.hours = 3*temp-1;
value.hours += '00';
break;
}
}
value.today = today;
return value;
}
......