Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: fpdfsdk/cpdfsdk_datetime.cpp

Issue 2382723003: Move core/fxcrt/include to core/fxcrt (Closed)
Patch Set: Rebase to master Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/cfx_systemhandler.h ('k') | fpdfsdk/formfiller/cffl_combobox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/include/cpdfsdk_datetime.h" 7 #include "fpdfsdk/include/cpdfsdk_datetime.h"
8 8
9 #include "core/fxcrt/include/fx_ext.h" 9 #include "core/fxcrt/fx_ext.h"
10 10
11 namespace { 11 namespace {
12 12
13 int GetTimeZoneInSeconds(int8_t tzhour, uint8_t tzminute) { 13 int GetTimeZoneInSeconds(int8_t tzhour, uint8_t tzminute) {
14 return (int)tzhour * 3600 + (int)tzminute * (tzhour >= 0 ? 60 : -60); 14 return (int)tzhour * 3600 + (int)tzminute * (tzhour >= 0 ? 60 : -60);
15 } 15 }
16 16
17 bool IsLeapYear(int16_t year) { 17 bool IsLeapYear(int16_t year) {
18 return ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0))); 18 return ((year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0)));
19 } 19 }
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 m_hour = static_cast<uint8_t>(n / 3600); 403 m_hour = static_cast<uint8_t>(n / 3600);
404 m_hour %= 24; 404 m_hour %= 24;
405 n %= 3600; 405 n %= 3600;
406 m_minute = static_cast<uint8_t>(n / 60); 406 m_minute = static_cast<uint8_t>(n / 60);
407 m_second = static_cast<uint8_t>(n % 60); 407 m_second = static_cast<uint8_t>(n % 60);
408 if (days != 0) 408 if (days != 0)
409 AddDays(days); 409 AddDays(days);
410 410
411 return *this; 411 return *this;
412 } 412 }
OLDNEW
« no previous file with comments | « fpdfsdk/cfx_systemhandler.h ('k') | fpdfsdk/formfiller/cffl_combobox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698