aboutsummaryrefslogtreecommitdiffstats
path: root/util/draft/date.h
diff options
context:
space:
mode:
authorkostyagin <kostyagin@yandex-team.ru>2022-02-10 16:51:59 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:51:59 +0300
commit7213cb3148401a37749d1557d0175fca573c7a72 (patch)
treeab7fbbf3253d4c0e2793218f09378908beb025fb /util/draft/date.h
parent9a6bfabe488957bae27bc40283cf4a8ed3fb24f7 (diff)
downloadydb-7213cb3148401a37749d1557d0175fca573c7a72.tar.gz
Restoring authorship annotation for <kostyagin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/draft/date.h')
-rw-r--r--util/draft/date.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/util/draft/date.h b/util/draft/date.h
index 97b3b7f688..e3eb616fe5 100644
--- a/util/draft/date.h
+++ b/util/draft/date.h
@@ -110,20 +110,20 @@ inline bool operator==(const TDate& left, const TDate& right) {
}
inline int operator-(const TDate& left, const TDate& right) {
- if (left < right) {
- return -(right - left);
- }
+ if (left < right) {
+ return -(right - left);
+ }
return static_cast<int>((left.Timestamp + SECONDS_IN_DAY / 2 - right.Timestamp) / SECONDS_IN_DAY);
-}
-
+}
+
inline IInputStream& operator>>(IInputStream& left, TDate& right) {
TString stroka;
- left >> stroka;
- TDate date(stroka.c_str());
- right = date;
- return left;
-}
-
+ left >> stroka;
+ TDate date(stroka.c_str());
+ right = date;
+ return left;
+}
+
inline IOutputStream& operator<<(IOutputStream& left, const TDate& right) {
return left << right.ToStroka();
}