MCPcopy Create free account
hub / github.com/catboost/catboost / Strftime

Function Strftime

util/datetime/base.cpp:11–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <util/generic/yexception.h>
10
11TString Strftime(const char* format, const struct tm* tm) {
12 size_t size = Max<size_t>(strlen(format) * 2 + 1, 107);
13 for (;;) {
14 TTempBuf buf(size);
15 int r = strftime(buf.Data(), buf.Size(), format, tm);
16 if (r != 0) {
17 return TString(buf.Data(), r);
18 }
19 size *= 2;
20 }
21}
22
23template <>
24TDuration FromStringImpl<TDuration, char>(const char* s, size_t len) {

Callers 6

GetLocalTimeSSimpleFunction · 0.85
FormatLocalTimeMethod · 0.85
FormatGmTimeMethod · 0.85
Y_UNIT_TESTFunction · 0.85
ToStringMethod · 0.85
ToStrokaMethod · 0.85

Calls 2

DataMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected