OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
| 7 #include <time.h> |
| 8 #include <cmath> |
| 9 #include <limits> |
| 10 |
7 #include "../../include/javascript/JavaScript.h" | 11 #include "../../include/javascript/JavaScript.h" |
8 #include "../../include/javascript/JS_Define.h" | 12 #include "../../include/javascript/JS_Define.h" |
9 #include "../../include/javascript/JS_Object.h" | 13 #include "../../include/javascript/JS_Object.h" |
10 #include "../../include/javascript/JS_Value.h" | 14 #include "../../include/javascript/JS_Value.h" |
11 #include "../../include/javascript/Document.h" | 15 #include "../../include/javascript/Document.h" |
12 | 16 |
13 static const FX_DWORD g_nan[2] = {0, 0x7FF80000}; | 17 static const FX_DWORD g_nan[2] = {0, 0x7FF80000}; |
14 static double GetNan() { | 18 static double GetNan() { |
15 return *(double*)g_nan; | 19 return *(double*)g_nan; |
16 } | 20 } |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 return day * 86400000 + time; | 857 return day * 86400000 + time; |
854 } | 858 } |
855 | 859 |
856 bool JS_PortIsNan(double d) { | 860 bool JS_PortIsNan(double d) { |
857 return d != d; | 861 return d != d; |
858 } | 862 } |
859 | 863 |
860 double JS_LocalTime(double d) { | 864 double JS_LocalTime(double d) { |
861 return JS_GetDateTime() + _getDaylightSavingTA(d); | 865 return JS_GetDateTime() + _getDaylightSavingTA(d); |
862 } | 866 } |
OLD | NEW |