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 | 00afc96e9c0298054b7386fa7fb9e3cc3d67b974 (patch) | |
tree | cb7a9f4a92c0d4cc5a86eeed49ad71e810953c1f /util/draft/datetime.cpp | |
parent | 83a8efcf3af051e3dd59c00d1d5dafc96412ec1e (diff) | |
download | ydb-00afc96e9c0298054b7386fa7fb9e3cc3d67b974.tar.gz |
Restoring authorship annotation for <akhropov@yandex-team.ru>. Commit 1 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 5cbe7d8847..cd6a2462cc 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; +} |