getMinutes 메서드
getMinutes 메서드는
날짜 객체에 적용되며
현재 분 값을 반환합니다 (0부터 59까지의 숫자).
문법
date.getMinutes();
예제
현재 분을 출력해 봅시다:
let date = new Date();
let res = date.getMinutes();
console.log(res);
참고 항목
-
시간을 가져오는 메서드
getHours -
초를 가져오는 메서드
getSeconds -
밀리초를 가져오는 메서드
getMilliseconds