javascript dateformat
[javascript] 현재 날짜 시간 구하기 date format ( yyyy-MM-dd, yyyy-MM-dd hh:mm:ss )
//yyyy-MM-dd function convertDate(datetime){ var date = new Date(datetime); var year = date.getFullYear(); var month = date.getMonth()+1; month = month >= 10 ? month : '0' + month; var day = date.getDate(); day = day >= 10 ? day : '0' + day; return [year,month,day].join('-'); } //yyyy-MM-dd HH:mm:ss function convertDateTime(datetime){ var date = new Date(datetime); var year = date.getFullYear();..