diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2017-06-23 15:03:50 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-06-26 13:28:00 +0000 |
commit | b9776c71718bba353225e6a2010cf0ab1e926658 (patch) | |
tree | 8578fbb2ce9a64a60aea4af98b8f46a34e004aa0 /testing/fx_string_testhelpers.cpp | |
parent | 5c3e5c13b9fc0285c47493eca1f9363a218d12a8 (diff) | |
download | pdfium-b9776c71718bba353225e6a2010cf0ab1e926658.tar.xz |
Adding back the CFX_DateTime print helpers.
Change-Id: I23fe37139ed06a7e09f6a39ea833a6a984add49e
Reviewed-on: https://pdfium-review.googlesource.com/6913
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing/fx_string_testhelpers.cpp')
-rw-r--r-- | testing/fx_string_testhelpers.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/fx_string_testhelpers.cpp b/testing/fx_string_testhelpers.cpp new file mode 100644 index 0000000000..443cc89ed1 --- /dev/null +++ b/testing/fx_string_testhelpers.cpp @@ -0,0 +1,18 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "testing/fx_string_testhelpers.h" + +#include <iomanip> +#include <ios> +#include <string> + +std::ostream& operator<<(std::ostream& os, const CFX_DateTime& dt) { + os << dt.GetYear() << "-" << std::to_string(dt.GetMonth()) << "-" + << std::to_string(dt.GetDay()) << " " << std::to_string(dt.GetHour()) + << ":" << std::to_string(dt.GetMinute()) << ":" + << std::to_string(dt.GetSecond()) << "." + << std::to_string(dt.GetMillisecond()); + return os; +} |