MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getMonth

Method getMonth

game/state/gametime.cpp:126–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124UString GameTime::getWeekString() const { return format("%s %d", tr("Week"), getWeek()); }
125
126unsigned int GameTime::getMonth() const
127{
128 const date currentDate = getPtime(this->ticks).date();
129
130 const int months = (currentDate.year() - GAME_START.date().year()) * 12 + currentDate.month() -
131 GAME_START.date().month();
132 return months;
133}
134
135unsigned int GameTime::getWeek() const
136{

Callers

nothing calls this directly

Calls 1

getPtimeFunction · 0.85

Tested by

no test coverage detected