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 "fpdfsdk/src/javascript/util.h" | 7 #include "fpdfsdk/src/javascript/util.h" |
8 | 8 |
9 #include <time.h> | 9 #include <time.h> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 struct stru_TbConvert { | 47 struct stru_TbConvert { |
48 const FX_WCHAR* lpszJSMark; | 48 const FX_WCHAR* lpszJSMark; |
49 const FX_WCHAR* lpszCppMark; | 49 const FX_WCHAR* lpszCppMark; |
50 }; | 50 }; |
51 | 51 |
52 const stru_TbConvert fcTable[] = { | 52 const stru_TbConvert fcTable[] = { |
53 {L"mmmm", L"%B"}, | 53 {L"mmmm", L"%B"}, |
54 {L"mmm", L"%b"}, | 54 {L"mmm", L"%b"}, |
55 {L"mm", L"%m"}, | 55 {L"mm", L"%m"}, |
56 //"m" | 56 // "m" |
57 {L"dddd", L"%A"}, | 57 {L"dddd", L"%A"}, |
58 {L"ddd", L"%a"}, | 58 {L"ddd", L"%a"}, |
59 {L"dd", L"%d"}, | 59 {L"dd", L"%d"}, |
60 //"d", "%w", | 60 // "d", "%w", |
61 {L"yyyy", L"%Y"}, | 61 {L"yyyy", L"%Y"}, |
62 {L"yy", L"%y"}, | 62 {L"yy", L"%y"}, |
63 {L"HH", L"%H"}, | 63 {L"HH", L"%H"}, |
64 //"H" | 64 // "H" |
65 {L"hh", L"%I"}, | 65 {L"hh", L"%I"}, |
66 //"h" | 66 // "h" |
67 {L"MM", L"%M"}, | 67 {L"MM", L"%M"}, |
68 //"M" | 68 // "M" |
69 {L"ss", L"%S"}, | 69 {L"ss", L"%S"}, |
70 //"s | 70 // "s |
71 {L"TT", L"%p"}, | 71 {L"TT", L"%p"}, |
72 //"t" | 72 // "t" |
73 #if defined(_WIN32) | 73 #if defined(_WIN32) |
74 {L"tt", L"%p"}, | 74 {L"tt", L"%p"}, |
75 {L"h", L"%#I"}, | 75 {L"h", L"%#I"}, |
76 #else | 76 #else |
77 {L"tt", L"%P"}, | 77 {L"tt", L"%P"}, |
78 {L"h", L"%l"}, | 78 {L"h", L"%l"}, |
79 #endif | 79 #endif |
80 }; | 80 }; |
81 | 81 |
82 #define UTIL_INT 0 | 82 #define UTIL_INT 0 |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 int iSize = params.size(); | 543 int iSize = params.size(); |
544 if (iSize == 0) | 544 if (iSize == 0) |
545 return FALSE; | 545 return FALSE; |
546 int nByte = params[0].ToInt(); | 546 int nByte = params[0].ToInt(); |
547 unsigned char cByte = (unsigned char)nByte; | 547 unsigned char cByte = (unsigned char)nByte; |
548 CFX_WideString csValue; | 548 CFX_WideString csValue; |
549 csValue.Format(L"%c", cByte); | 549 csValue.Format(L"%c", cByte); |
550 vRet = csValue.c_str(); | 550 vRet = csValue.c_str(); |
551 return TRUE; | 551 return TRUE; |
552 } | 552 } |
OLD | NEW |