Title: [123584] trunk/Source/_javascript_Core
Revision
123584
Author
par...@webkit.org
Date
2012-07-25 00:42:03 -0700 (Wed, 25 Jul 2012)

Log Message

REGRESSION(r123505): Date.getYear() returns the same as Date.getFullYear()
https://bugs.webkit.org/show_bug.cgi?id=92218

Reviewed by Csaba Osztrogonác.

* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncGetYear): Added the missing offset of 1900 to the return value.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (123583 => 123584)


--- trunk/Source/_javascript_Core/ChangeLog	2012-07-25 07:32:07 UTC (rev 123583)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-07-25 07:42:03 UTC (rev 123584)
@@ -1,3 +1,13 @@
+2012-07-25  Patrick Gansterer  <par...@webkit.org>
+
+        REGRESSION(r123505): Date.getYear() returns the same as Date.getFullYear()
+        https://bugs.webkit.org/show_bug.cgi?id=92218
+
+        Reviewed by Csaba Osztrogonác.
+
+        * runtime/DatePrototype.cpp:
+        (JSC::dateProtoFuncGetYear): Added the missing offset of 1900 to the return value.
+
 2012-07-24  Filip Pizlo  <fpi...@apple.com>
 
         REGRESSION(r123417): It made tests assert/crash on 32 bit

Modified: trunk/Source/_javascript_Core/runtime/DatePrototype.cpp (123583 => 123584)


--- trunk/Source/_javascript_Core/runtime/DatePrototype.cpp	2012-07-25 07:32:07 UTC (rev 123583)
+++ trunk/Source/_javascript_Core/runtime/DatePrototype.cpp	2012-07-25 07:42:03 UTC (rev 123584)
@@ -1135,7 +1135,7 @@
         return JSValue::encode(jsNaN());
 
     // NOTE: IE returns the full year even in getYear.
-    return JSValue::encode(jsNumber(gregorianDateTime->year()));
+    return JSValue::encode(jsNumber(gregorianDateTime->year() - 1900));
 }
 
 EncodedJSValue JSC_HOST_CALL dateProtoFuncToJSON(ExecState* exec)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to