[javascript] 년월일(YYYYMMDD) 체크
·
Language/JavaScript
function isDateYmd(sYmd) { if(isEmpty(sYmd) || sYmd.length < 8) { return false; } var dateArr = new Array(); dateArr[0] = dateStr.substring(0,3); dateArr[1] = dateStr.substring(3,5); dateArr[2] = dateStr.substring(5,7); var dateYmd = new Date(dateArr[0], dateArr[1], dateArr[2]); if( dateArr[0] == dateYmd.getFullYear() && dateArr[1] == dateYmd.getMonth() && dateArr[2] == dateYmd.getDate() ) { ret..