Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/catboost/catboost
/ GetYear
Method
GetYear
util/draft/date.cpp:97–101 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
95
}
96
97
unsigned TDate::GetYear() const {
98
tm dateTm;
99
localtime_r(&Timestamp, &dateTm);
100
return ((unsigned)dateTm.tm_year) + 1900;
101
}
102
103
unsigned TDate::GetMonth() const {
104
tm dateTm;
Callers
1
Y_UNIT_TEST
Function · 0.80
Calls
1
localtime_r
Function · 0.85
Tested by
no test coverage detected