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

Function ParseDate

util/draft/date.cpp:20–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20static time_t ParseDate(const char* date, const char* format) {
21 tm dateTm;
22 memset(&dateTm, 0, sizeof(tm));
23 if (!strptime(date, format, &dateTm)) {
24 ythrow yexception() << "Invalid date string and format: " << date << ", " << format;
25 }
26 return mktime(&dateTm);
27}
28
29static time_t ParseDate(const char* dateStr) {
30 if (strlen(dateStr) != 8) {

Callers 2

FromStringImpl<TDate>Function · 0.85
TDateMethod · 0.85

Calls 1

strptimeFunction · 0.50

Tested by

no test coverage detected