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 #ifndef XFA_FGAS_LOCALIZATION_FGAS_DATETIME_H_ | 7 #ifndef XFA_FGAS_LOCALIZATION_FGAS_DATETIME_H_ |
8 #define XFA_FGAS_LOCALIZATION_FGAS_DATETIME_H_ | 8 #define XFA_FGAS_LOCALIZATION_FGAS_DATETIME_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_system.h" | 10 #include "core/fxcrt/include/fx_system.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 struct { | 198 struct { |
199 uint8_t hour; | 199 uint8_t hour; |
200 uint8_t minute; | 200 uint8_t minute; |
201 uint8_t second; | 201 uint8_t second; |
202 uint16_t millisecond; | 202 uint16_t millisecond; |
203 } sTime; | 203 } sTime; |
204 FX_TIME aTime; | 204 FX_TIME aTime; |
205 } Time; | 205 } Time; |
206 }; | 206 }; |
207 | 207 |
208 struct FX_DATETIMEZONE { | |
209 union { | |
210 struct { | |
211 union { | |
212 struct { | |
213 int32_t year; | |
214 uint8_t month; | |
215 uint8_t day; | |
216 }; | |
217 FX_DATE date; | |
218 }; | |
219 union { | |
220 struct { | |
221 uint8_t hour; | |
222 uint8_t minute; | |
223 uint8_t second; | |
224 uint16_t millisecond; | |
225 }; | |
226 FX_TIME time; | |
227 }; | |
228 }; | |
229 FX_DATETIME dt; | |
230 }; | |
231 union { | |
232 struct { | |
233 int8_t tzHour; | |
234 uint8_t tzMinute; | |
235 }; | |
236 FX_TIMEZONE tz; | |
237 }; | |
238 }; | |
239 #if _FX_OS_ != _FX_ANDROID_ | 208 #if _FX_OS_ != _FX_ANDROID_ |
240 #pragma pack(pop) | 209 #pragma pack(pop) |
241 #endif | 210 #endif |
242 | 211 |
243 class CFX_DateTime { | 212 class CFX_DateTime { |
244 public: | 213 public: |
245 CFX_DateTime() {} | 214 CFX_DateTime() {} |
246 CFX_DateTime(const FX_DATETIME& dt) { m_DateTime = dt; } | 215 CFX_DateTime(const FX_DATETIME& dt) { m_DateTime = dt; } |
247 CFX_DateTime(const CFX_DateTime& dt) { m_DateTime = dt.m_DateTime; } | 216 CFX_DateTime(const CFX_DateTime& dt) { m_DateTime = dt.m_DateTime; } |
248 virtual ~CFX_DateTime() {} | 217 virtual ~CFX_DateTime() {} |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 } | 366 } |
398 friend FX_BOOL operator<=(const FX_DATETIME& dt1, const CFX_DateTime& dt2) { | 367 friend FX_BOOL operator<=(const FX_DATETIME& dt1, const CFX_DateTime& dt2) { |
399 return ((const CFX_DateTime&)dt1).ToUnitime() <= dt2.ToUnitime(); | 368 return ((const CFX_DateTime&)dt1).ToUnitime() <= dt2.ToUnitime(); |
400 } | 369 } |
401 | 370 |
402 private: | 371 private: |
403 FX_DATETIME m_DateTime; | 372 FX_DATETIME m_DateTime; |
404 }; | 373 }; |
405 | 374 |
406 #endif // XFA_FGAS_LOCALIZATION_FGAS_DATETIME_H_ | 375 #endif // XFA_FGAS_LOCALIZATION_FGAS_DATETIME_H_ |
OLD | NEW |