From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- .../global_objects/date/valueof/index.html | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 files/ko/web/javascript/reference/global_objects/date/valueof/index.html (limited to 'files/ko/web/javascript/reference/global_objects/date/valueof/index.html') diff --git a/files/ko/web/javascript/reference/global_objects/date/valueof/index.html b/files/ko/web/javascript/reference/global_objects/date/valueof/index.html new file mode 100644 index 0000000000..778321f74e --- /dev/null +++ b/files/ko/web/javascript/reference/global_objects/date/valueof/index.html @@ -0,0 +1,79 @@ +--- +title: Date.prototype.valueOf() +slug: Web/JavaScript/Reference/Global_Objects/Date/valueOf +translation_of: Web/JavaScript/Reference/Global_Objects/Date/valueOf +--- +
{{JSRef}}
+ +

valueOf() 함수는 {{jsxref("Date")}} 객체의 원시값을 반환합니다.

+ +
{{EmbedInteractiveExample("pages/js/date-valueof.html")}}
+ +

Syntax

+ +
dateObj.valueOf()
+ +

Return value

+ +

반환되는 milliseconds 값은 1 January 1970 00:00:00 UTC 와 주어진 일시 사이의 값입니다.

+ +

Description

+ +

valueOf() 함수는 01 January, 1970 UTC 이후의 milliseconds 단위의 자연수 타입인 {{jsxref("Date")}} 객체의 원시값을 반환합니다.

+ +

이 함수는 {{jsxref("Date.prototype.getTime()")}} 함수와 동일한 결과값을 반환합니다.

+ +

이 함수는 사용자 코드에 명시된 것이 아닌, JavaScript 자체에 포함되어 있습니다.

+ +

Examples

+ +

Using valueOf()

+ +
var x = new Date(56, 6, 17);
+var myVar = x.valueOf();      // myVar에 -424713600000를 할당합니다.
+
+ +

Specifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES1')}}{{Spec2('ES1')}}최초 정의. JavaScript 1.1에서 구현
{{SpecName('ES5.1', '#sec-15.9.5.8', 'Date.prototype.valueOf')}}{{Spec2('ES5.1')}}
{{SpecName('ES6', '#sec-date.prototype.valueof', 'Date.prototype.valueOf')}}{{Spec2('ES6')}}
{{SpecName('ESDraft', '#sec-date.prototype.valueof', 'Date.prototype.valueOf')}}{{Spec2('ESDraft')}}
+ +

Browser compatibility

+ + + +

{{Compat("javascript.builtins.Date.valueOf")}}

+ +

See also

+ + -- cgit v1.2.3-54-g00ecf