Date.prototype.getMinutes()

getMinutes() 메서드는 Date 인스턴스의 분을 현지 시간 기준으로 반환합니다.

구문

dateObj.getMinutes()

반환 값

주어진 날짜의 현지 시간 기준 분을 나타내는 0에서 59 사이의 정수.

예제

getMinutes() 사용하기

다음 예제는 Date 객체 Xmas95의 분을 사용해 변수 minutes에 15를 할당합니다.

var Xmas95 = new Date('December 25, 1995 23:15:30');
var minutes = Xmas95.getMinutes();

console.log(minutes); // 15

명세

Specification Status Comment
ECMAScript 1st Edition (ECMA-262) Standard Initial definition. Implemented in JavaScript 1.0.
ECMAScript 5.1 (ECMA-262)
The definition of 'Date.prototype.getMinutes' in that specification.
Standard
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'Date.prototype.getMinutes' in that specification.
Standard
ECMAScript Latest Draft (ECMA-262)
The definition of 'Date.prototype.getMinutes' in that specification.
Draft

브라우저 호환성

Update compatibility data on GitHub
DesktopMobileServer
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
getMinutesChrome Full support YesEdge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yesnodejs Full support Yes

Legend

Full support  
Full support

같이 보기