TimeStr1 [JS&jQuery] 문자열 시간(HH:MM:SS) 정수형 초 단위(Second)로 변환 function timeStrToSeconds(timeStr) { const [hours, minutes, seconds] = timeStr.split(":"); var resSeconds = (+hours) * 60 * 60 + (+minutes) * 60 + (+seconds); return resSeconds; } 🙏 참조 :: https://thewebdev.info/2021/05/23/how-to-convert-hhmmss-time-string-to-seconds-only-in-javascript/ 2021. 9. 10. 이전 1 다음