Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/datetime.js
- This file was added.
function datetimeToString(datetime, showSeconds = false) | |||||
{ | |||||
return showSeconds ? | |||||
// Translation: Format of the local datetime as shown for example in the load game, save game, and replay menus. | |||||
// For a list of symbols that you can use, see: | |||||
// http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Field-Symbol-Table | |||||
Engine.FormatMillisecondsIntoDateStringLocal(datetime, translateWithContext("datetime, with seconds", "yyyy-MM-dd HH:mm:ss")) : | |||||
// Translation: Format of the local datetime as shown for example in the load game, save game, and replay menus. | |||||
// For a list of symbols that you can use, see: | |||||
// http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Field-Symbol-Table | |||||
Engine.FormatMillisecondsIntoDateStringLocal(datetime, translateWithContext("datetime, without seconds", "yyyy-MM-dd HH:mm")); | |||||
} | |||||
function monthToString(datetime) | |||||
{ | |||||
// Translation: Format of the local date (month) as shown for example in the date filter dropdown in the replay menu. | |||||
// For a list of symbols that you can use, see: | |||||
// http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Field-Symbol-Table | |||||
return Engine.FormatMillisecondsIntoDateStringLocal(datetime, translateWithContext("date month", "yyyy-MM")); | |||||
} |
Wildfire Games · Phabricator