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

Function str2date

util/draft/datetime.h:145–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145inline time_t str2date(const TString& dateStr) {
146 struct tm dateTm;
147 memset(&dateTm, 0, sizeof(tm));
148 strptime(dateStr.data(), "%Y%m%d", &dateTm);
149 return mktime(&dateTm);
150}
151
152// checks whether time2 > time1 and close enough to it
153inline bool AreTimesSeqAndClose(time_t time1, time_t time2, time_t closeInterval = 10) {

Callers

nothing calls this directly

Calls 2

strptimeFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected