diff options
author | nkmakarov <nkmakarov@yandex-team.ru> | 2022-02-10 16:49:06 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:06 +0300 |
commit | 324348a37ed08cf66897faefb0ec4bebfe7804e1 (patch) | |
tree | 8736a3afd6953763bf57544746bf1b8b5404dec6 /util/draft/date.h | |
parent | 5eddcf9f19515e4be1e49ba1482d920e007a07d1 (diff) | |
download | ydb-324348a37ed08cf66897faefb0ec4bebfe7804e1.tar.gz |
Restoring authorship annotation for <nkmakarov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/draft/date.h')
-rw-r--r-- | util/draft/date.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/draft/date.h b/util/draft/date.h index e3eb616fe5..2a9cbc3997 100644 --- a/util/draft/date.h +++ b/util/draft/date.h @@ -3,7 +3,7 @@ #include <util/stream/output.h> #include <util/stream/input.h> #include <util/generic/string.h> -#include <util/datetime/constants.h> +#include <util/datetime/constants.h> #include <ctime> @@ -43,31 +43,31 @@ public: TString ToStroka(const char* format = "%Y%m%d") const; TDate& operator++() { - Timestamp = GetDateStart(Timestamp + 3 * (SECONDS_IN_DAY / 2)); + Timestamp = GetDateStart(Timestamp + 3 * (SECONDS_IN_DAY / 2)); return *this; } TDate& operator--() { - Timestamp = GetDateStart(Timestamp - SECONDS_IN_DAY / 2); + Timestamp = GetDateStart(Timestamp - SECONDS_IN_DAY / 2); return *this; } TDate& operator+=(unsigned days) { - Timestamp = GetDateStart(Timestamp + days * SECONDS_IN_DAY + SECONDS_IN_DAY / 2); + Timestamp = GetDateStart(Timestamp + days * SECONDS_IN_DAY + SECONDS_IN_DAY / 2); return *this; } TDate& operator-=(unsigned days) { - Timestamp = GetDateStart(Timestamp - days * SECONDS_IN_DAY + SECONDS_IN_DAY / 2); + Timestamp = GetDateStart(Timestamp - days * SECONDS_IN_DAY + SECONDS_IN_DAY / 2); return *this; } TDate operator+(unsigned days) const { - return TDate(Timestamp + days * SECONDS_IN_DAY + SECONDS_IN_DAY / 2); + return TDate(Timestamp + days * SECONDS_IN_DAY + SECONDS_IN_DAY / 2); } TDate operator-(unsigned days) const { - return TDate(Timestamp - days * SECONDS_IN_DAY + SECONDS_IN_DAY / 2); + return TDate(Timestamp - days * SECONDS_IN_DAY + SECONDS_IN_DAY / 2); } unsigned GetWeekDay() const; // days since Sunday @@ -113,7 +113,7 @@ inline int operator-(const TDate& left, const TDate& right) { if (left < right) { return -(right - left); } - return static_cast<int>((left.Timestamp + SECONDS_IN_DAY / 2 - right.Timestamp) / SECONDS_IN_DAY); + return static_cast<int>((left.Timestamp + SECONDS_IN_DAY / 2 - right.Timestamp) / SECONDS_IN_DAY); } inline IInputStream& operator>>(IInputStream& left, TDate& right) { |