OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 var $createDate; | 5 var $createDate; |
6 | 6 |
7 // ------------------------------------------------------------------- | 7 // ------------------------------------------------------------------- |
8 | 8 |
9 (function(global, utils) { | 9 (function(global, utils) { |
10 | 10 |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 '-' + PadInt(UTC_DAY(this), 2) + | 768 '-' + PadInt(UTC_DAY(this), 2) + |
769 'T' + PadInt(UTC_HOUR(this), 2) + | 769 'T' + PadInt(UTC_HOUR(this), 2) + |
770 ':' + PadInt(UTC_MIN(this), 2) + | 770 ':' + PadInt(UTC_MIN(this), 2) + |
771 ':' + PadInt(UTC_SEC(this), 2) + | 771 ':' + PadInt(UTC_SEC(this), 2) + |
772 '.' + PadInt(UTC_MS(this), 3) + | 772 '.' + PadInt(UTC_MS(this), 3) + |
773 'Z'; | 773 'Z'; |
774 } | 774 } |
775 | 775 |
776 | 776 |
777 function DateToJSON(key) { | 777 function DateToJSON(key) { |
778 var o = $toObject(this); | 778 var o = TO_OBJECT(this); |
779 var tv = $defaultNumber(o); | 779 var tv = $defaultNumber(o); |
780 if (IS_NUMBER(tv) && !NUMBER_IS_FINITE(tv)) { | 780 if (IS_NUMBER(tv) && !NUMBER_IS_FINITE(tv)) { |
781 return null; | 781 return null; |
782 } | 782 } |
783 return o.toISOString(); | 783 return o.toISOString(); |
784 } | 784 } |
785 | 785 |
786 | 786 |
787 var date_cache_version_holder; | 787 var date_cache_version_holder; |
788 var date_cache_version = NAN; | 788 var date_cache_version = NAN; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 "getYear", DateGetYear, | 877 "getYear", DateGetYear, |
878 "setYear", DateSetYear, | 878 "setYear", DateSetYear, |
879 "toISOString", DateToISOString, | 879 "toISOString", DateToISOString, |
880 "toJSON", DateToJSON | 880 "toJSON", DateToJSON |
881 ]); | 881 ]); |
882 | 882 |
883 // Expose to the global scope. | 883 // Expose to the global scope. |
884 $createDate = CreateDate; | 884 $createDate = CreateDate; |
885 | 885 |
886 }) | 886 }) |
OLD | NEW |