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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 ':' + PadInt(this.getUTCMinutes(), 2) + | 993 ':' + PadInt(this.getUTCMinutes(), 2) + |
994 ':' + PadInt(this.getUTCSeconds(), 2) + | 994 ':' + PadInt(this.getUTCSeconds(), 2) + |
995 '.' + PadInt(this.getUTCMilliseconds(), 3) + | 995 '.' + PadInt(this.getUTCMilliseconds(), 3) + |
996 'Z'; | 996 'Z'; |
997 } | 997 } |
998 | 998 |
999 | 999 |
1000 function DateToJSON(key) { | 1000 function DateToJSON(key) { |
1001 var o = ToObject(this); | 1001 var o = ToObject(this); |
1002 var tv = DefaultNumber(o); | 1002 var tv = DefaultNumber(o); |
1003 if (IS_NUMBER(tv) && !$isFinite(tv)) { | 1003 if (IS_NUMBER(tv) && !NUMBER_IS_FINITE(tv)) { |
1004 return null; | 1004 return null; |
1005 } | 1005 } |
1006 return o.toISOString(); | 1006 return o.toISOString(); |
1007 } | 1007 } |
1008 | 1008 |
1009 | 1009 |
1010 function ResetDateCache() { | 1010 function ResetDateCache() { |
1011 | 1011 |
1012 // Reset the local_time_offset: | 1012 // Reset the local_time_offset: |
1013 local_time_offset = %DateLocalTimeOffset(); | 1013 local_time_offset = %DateLocalTimeOffset(); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 "toGMTString", DateToGMTString, | 1099 "toGMTString", DateToGMTString, |
1100 "toUTCString", DateToUTCString, | 1100 "toUTCString", DateToUTCString, |
1101 "getYear", DateGetYear, | 1101 "getYear", DateGetYear, |
1102 "setYear", DateSetYear, | 1102 "setYear", DateSetYear, |
1103 "toISOString", DateToISOString, | 1103 "toISOString", DateToISOString, |
1104 "toJSON", DateToJSON | 1104 "toJSON", DateToJSON |
1105 )); | 1105 )); |
1106 } | 1106 } |
1107 | 1107 |
1108 SetupDate(); | 1108 SetupDate(); |
OLD | NEW |