diff options
author | akhropov <akhropov@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
commit | 298c6da79f1d8f35089a67f463f0b541bec36d9b (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/draft/datetime.cpp | |
parent | 00afc96e9c0298054b7386fa7fb9e3cc3d67b974 (diff) | |
download | ydb-298c6da79f1d8f35089a67f463f0b541bec36d9b.tar.gz |
Restoring authorship annotation for <akhropov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/draft/datetime.cpp')
-rw-r--r-- | util/draft/datetime.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/util/draft/datetime.cpp b/util/draft/datetime.cpp index cd6a2462cc..5cbe7d8847 100644 --- a/util/draft/datetime.cpp +++ b/util/draft/datetime.cpp @@ -1,15 +1,15 @@ #include "datetime.h" -#include <util/ysaveload.h> - +#include <util/ysaveload.h> + #include <util/system/atomic.h> #include <util/system/fasttime.h> #include <util/datetime/base.h> #include <util/datetime/systime.h> #include <util/stream/output.h> -#include <util/stream/mem.h> -#include <util/string/cast.h> -#include <util/string/printf.h> +#include <util/stream/mem.h> +#include <util/string/cast.h> +#include <util/string/printf.h> namespace NDatetime { const ui32 MonthDays[2][12] = { @@ -213,25 +213,25 @@ namespace NDatetime { return t; } } - + template <> void In<TMonth>(IInputStream& in, TMonth& t) { - char buf[4]; - LoadPodArray(&in, buf, 4); + char buf[4]; + LoadPodArray(&in, buf, 4); t.Year = FromString<ui16>(buf, 4); - LoadPodArray(&in, buf, 2); + LoadPodArray(&in, buf, 2); t.Month = ui8(FromString<ui16>(buf, 2)) - 1; -} - +} + template <> void Out<TMonth>(IOutputStream& o, const TMonth& t) { - o << t.Year << Sprintf("%.2hu", (ui16)(t.Month + 1)); -} - + o << t.Year << Sprintf("%.2hu", (ui16)(t.Month + 1)); +} + template <> TMonth FromStringImpl<TMonth, char>(const char* s, size_t len) { - TMonth res; + TMonth res; TMemoryInput in(s, len); - in >> res; - return res; -} + in >> res; + return res; +} |