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 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 | 952 |
953 function SetupDate() { | 953 function SetupDate() { |
954 // Setup non-enumerable properties of the Date object itself. | 954 // Setup non-enumerable properties of the Date object itself. |
955 InstallFunctions($Date, DONT_ENUM, $Array( | 955 InstallFunctions($Date, DONT_ENUM, $Array( |
956 "UTC", DateUTC, | 956 "UTC", DateUTC, |
957 "parse", DateParse, | 957 "parse", DateParse, |
958 "now", DateNow | 958 "now", DateNow |
959 )); | 959 )); |
960 | 960 |
961 // Setup non-enumerable constructor property of the Date prototype object. | 961 // Setup non-enumerable constructor property of the Date prototype object. |
962 %AddProperty($Date.prototype, "constructor", $Date, DONT_ENUM); | 962 %SetProperty($Date.prototype, "constructor", $Date, DONT_ENUM); |
963 | 963 |
964 // Setup non-enumerable functions of the Date prototype object and | 964 // Setup non-enumerable functions of the Date prototype object and |
965 // set their names. | 965 // set their names. |
966 InstallFunctions($Date.prototype, DONT_ENUM, $Array( | 966 InstallFunctions($Date.prototype, DONT_ENUM, $Array( |
967 "toString", DateToString, | 967 "toString", DateToString, |
968 "toDateString", DateToDateString, | 968 "toDateString", DateToDateString, |
969 "toTimeString", DateToTimeString, | 969 "toTimeString", DateToTimeString, |
970 "toLocaleString", DateToLocaleString, | 970 "toLocaleString", DateToLocaleString, |
971 "toLocaleDateString", DateToLocaleDateString, | 971 "toLocaleDateString", DateToLocaleDateString, |
972 "toLocaleTimeString", DateToLocaleTimeString, | 972 "toLocaleTimeString", DateToLocaleTimeString, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 "setFullYear", DateSetFullYear, | 1005 "setFullYear", DateSetFullYear, |
1006 "setUTCFullYear", DateSetUTCFullYear, | 1006 "setUTCFullYear", DateSetUTCFullYear, |
1007 "toGMTString", DateToGMTString, | 1007 "toGMTString", DateToGMTString, |
1008 "toUTCString", DateToUTCString, | 1008 "toUTCString", DateToUTCString, |
1009 "getYear", DateGetYear, | 1009 "getYear", DateGetYear, |
1010 "setYear", DateSetYear | 1010 "setYear", DateSetYear |
1011 )); | 1011 )); |
1012 } | 1012 } |
1013 | 1013 |
1014 SetupDate(); | 1014 SetupDate(); |
OLD | NEW |