Avi Drissman | db497b3 | 2022-09-15 19:47:28 | [diff] [blame] | 1 | // Copyright 2021 The Chromium Authors |
Daniel Hosseinian | 04729322 | 2021-01-14 02:48:24 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef PDF_PDF_UTILS_DATES_H_ |
| 6 | #define PDF_PDF_UTILS_DATES_H_ |
| 7 | |
| 8 | #include "base/strings/string_piece.h" |
| 9 | |
| 10 | namespace base { |
| 11 | class Time; |
| 12 | } // namespace base |
| 13 | |
| 14 | namespace chrome_pdf { |
| 15 | |
| 16 | // Parses a string in the PDF date format (see section 7.9.4 "Dates" of the ISO |
Lei Zhang | 448c429 | 2021-10-18 17:29:53 | [diff] [blame] | 17 | // 32000-1:2008 spec). If `date` cannot be parsed, returns a "null" time (one |
| 18 | // for which `base::Time::is_null()` returns `true`). |
Daniel Hosseinian | 04729322 | 2021-01-14 02:48:24 | [diff] [blame] | 19 | base::Time ParsePdfDate(base::StringPiece date); |
| 20 | |
| 21 | } // namespace chrome_pdf |
| 22 | |
| 23 | #endif // PDF_PDF_UTILS_DATES_H_ |