| 49 | } |
| 50 | |
| 51 | UString 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 | |
| 65 | UString GameTime::getLongDateString() const |
| 66 | { |
no test coverage detected