MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getDayString

Method getDayString

src/Savegame/GameTime.cpp:201–223  ·  view source on GitHub ↗

* Returns the localized representation of the current * ingame day with the cardinal operator. * @param lang Pointer to current language. * @return Localized day string. */

Source from the content-addressed store, hash-verified

199 * @return Localized day string.
200 */
201std::wstring GameTime::getDayString(Language *lang) const
202{
203 std::string s;
204 switch (_day)
205 {
206 case 1:
207 case 21:
208 case 31:
209 s = "STR_DATE_FIRST";
210 break;
211 case 2:
212 case 22:
213 s = "STR_DATE_SECOND";
214 break;
215 case 3:
216 case 23:
217 s = "STR_DATE_THIRD";
218 break;
219 default:
220 s = "STR_DATE_FOURTH";
221 }
222 return lang->getString(s).arg(_day);
223}
224
225/**
226 * Returns the current ingame month.

Callers 3

getSaveInfoMethod · 0.80
SoldierMemorialStateMethod · 0.80
timeDisplayMethod · 0.80

Calls 2

argMethod · 0.60
getStringMethod · 0.45

Tested by

no test coverage detected