| 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/i18n/time_formatting.h" | 5 #include "base/i18n/time_formatting.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| 11 #include "unicode/datefmt.h" | 11 #include "unicode/datefmt.h" |
| 12 | 12 |
| 13 using base::Time; | 13 using base::Time; |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 string16 TimeFormat(const icu::DateFormat* formatter, | 17 string16 TimeFormat(const icu::DateFormat* formatter, |
| 18 const Time& time) { | 18 const Time& time) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 return TimeFormat(formatter.get(), time); | 60 return TimeFormat(formatter.get(), time); |
| 61 } | 61 } |
| 62 | 62 |
| 63 string16 TimeFormatFriendlyDate(const Time& time) { | 63 string16 TimeFormatFriendlyDate(const Time& time) { |
| 64 scoped_ptr<icu::DateFormat> formatter(icu::DateFormat::createDateInstance( | 64 scoped_ptr<icu::DateFormat> formatter(icu::DateFormat::createDateInstance( |
| 65 icu::DateFormat::kFull)); | 65 icu::DateFormat::kFull)); |
| 66 return TimeFormat(formatter.get(), time); | 66 return TimeFormat(formatter.get(), time); |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace base | 69 } // namespace base |
| OLD | NEW |