MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / GetLocaleDateFormat

Function GetLocaleDateFormat

src/openrct2/platform/Platform.Posix.cpp:322–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320 }
321
322 uint8_t GetLocaleDateFormat()
323 {
324 const std::time_base::dateorder dateorder = std::use_facet<std::time_get<char>>(std::locale()).date_order();
325
326 switch (dateorder)
327 {
328 case std::time_base::mdy:
329 return DATE_FORMAT_MONTH_DAY_YEAR;
330
331 case std::time_base::ymd:
332 return DATE_FORMAT_YEAR_MONTH_DAY;
333
334 case std::time_base::ydm:
335 return DATE_FORMAT_YEAR_DAY_MONTH;
336
337 default:
338 return DATE_FORMAT_DAY_MONTH_YEAR;
339 }
340 }
341
342 TemperatureUnit GetLocaleTemperatureFormat()
343 {

Callers 1

ReadGeneralFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected