| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium 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 #include "base/time.h" | 5 #include <stdbool.h> |
| 6 #include <time.h> |
| 7 #include <string> |
| 8 |
| 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" |
| 6 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
| 7 #include "base/third_party/nspr/prtime.h" | 12 #include "base/third_party/nspr/prtime.h" |
| 8 | 13 #include "base/third_party/nspr/prtypes.h" |
| 9 #include "base/logging.h" | 14 #include "base/time.h" |
| 10 | 15 |
| 11 namespace base { | 16 namespace base { |
| 12 | 17 |
| 13 // TimeDelta ------------------------------------------------------------------ | 18 // TimeDelta ------------------------------------------------------------------ |
| 14 | 19 |
| 15 int TimeDelta::InDays() const { | 20 int TimeDelta::InDays() const { |
| 16 return static_cast<int>(delta_ / Time::kMicrosecondsPerDay); | 21 return static_cast<int>(delta_ / Time::kMicrosecondsPerDay); |
| 17 } | 22 } |
| 18 | 23 |
| 19 int TimeDelta::InHours() const { | 24 int TimeDelta::InHours() const { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 return is_in_range(month, 1, 12) && | 128 return is_in_range(month, 1, 12) && |
| 124 is_in_range(day_of_week, 0, 6) && | 129 is_in_range(day_of_week, 0, 6) && |
| 125 is_in_range(day_of_month, 1, 31) && | 130 is_in_range(day_of_month, 1, 31) && |
| 126 is_in_range(hour, 0, 23) && | 131 is_in_range(hour, 0, 23) && |
| 127 is_in_range(minute, 0, 59) && | 132 is_in_range(minute, 0, 59) && |
| 128 is_in_range(second, 0, 60) && | 133 is_in_range(second, 0, 60) && |
| 129 is_in_range(millisecond, 0, 999); | 134 is_in_range(millisecond, 0, 999); |
| 130 } | 135 } |
| 131 | 136 |
| 132 } // namespace base | 137 } // namespace base |
| OLD | NEW |