summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_datetime.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-06-05 09:53:06 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-06-05 14:11:19 +0000
commit6c5ea100a7d2531576037b17d5631dde42846b84 (patch)
tree70a5d02ef15a4354448be93926d79b5437c1b84c /core/fxcrt/cfx_datetime.cpp
parent7211eac14643bbbaf41bfc205c244668f46be440 (diff)
downloadpdfium-6c5ea100a7d2531576037b17d5631dde42846b84.tar.xz
Add start of CFGAS_FormatString tests
This CL adds tests for the date parsing and formatting code in CFGAS_FormatString. Change-Id: I9989cdd1b3f92c90d46ee2c3f7838fe1de255be2 Reviewed-on: https://pdfium-review.googlesource.com/6178 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_datetime.cpp')
-rw-r--r--core/fxcrt/cfx_datetime.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_datetime.cpp b/core/fxcrt/cfx_datetime.cpp
index dcf25d5463..833fe58907 100644
--- a/core/fxcrt/cfx_datetime.cpp
+++ b/core/fxcrt/cfx_datetime.cpp
@@ -127,3 +127,9 @@ int32_t CFX_DateTime::GetDayOfWeek() const {
v += 7;
return v;
}
+
+bool CFX_DateTime::operator==(const CFX_DateTime& other) const {
+ return year_ == other.year_ && month_ == other.month_ && day_ == other.day_ &&
+ hour_ == other.hour_ && minute_ == other.minute_ &&
+ second_ == other.second_ && millisecond_ == other.millisecond_;
+}