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

Method getShortTimeString

game/state/gametime.cpp:51–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51UString GameTime::getShortTimeString() const
52{
53 std::stringstream ss;
54 if (TIME_SHORT_FORMAT == nullptr)
55 {
56 // locale controls the facet
57 time_facet *timeFacet = new time_facet("%H:%M");
58 TIME_SHORT_FORMAT = new std::locale(std::locale::classic(), timeFacet);
59 }
60 ss.imbue(*TIME_SHORT_FORMAT);
61 ss << getPtime(this->ticks);
62 return ss.str();
63}
64
65UString GameTime::getLongDateString() const
66{

Callers 1

BattleBriefingMethod · 0.80

Calls 1

getPtimeFunction · 0.85

Tested by

no test coverage detected