[go: nahoru, domu]

blob: 9a17707f53aa8e57aae03166de978414d0029f87 [file] [log] [blame]
Avi Drissmandb497b32022-09-15 19:47:281// Copyright 2021 The Chromium Authors
Daniel Hosseinian047293222021-01-14 02:48:242// 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
10namespace base {
11class Time;
12} // namespace base
13
14namespace chrome_pdf {
15
16// Parses a string in the PDF date format (see section 7.9.4 "Dates" of the ISO
Lei Zhang448c4292021-10-18 17:29:5317// 32000-1:2008 spec). If `date` cannot be parsed, returns a "null" time (one
18// for which `base::Time::is_null()` returns `true`).
Daniel Hosseinian047293222021-01-14 02:48:2419base::Time ParsePdfDate(base::StringPiece date);
20
21} // namespace chrome_pdf
22
23#endif // PDF_PDF_UTILS_DATES_H_