aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2015-12-05 11:03:07 +0100
committerMartijn Kaijser <martijn@xbmc.org>2015-12-05 11:03:07 +0100
commite1216d6a8ea3a6c939a3d45bbd9643434e94a69d (patch)
tree4749feecc98c4fd95e11efd0ff564af0e544f409
parente31ce15d04773ca8d5e4afe5cd1420cdc4c4cef3 (diff)
parentd1ebec6af66e15b721789f6c2139adf474a37795 (diff)
Merge pull request #8282 from LS80/python_shortdate_format
[python] Fixed getRegion dateshort format without leading zero
-rw-r--r--xbmc/interfaces/legacy/ModuleXbmc.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/xbmc/interfaces/legacy/ModuleXbmc.cpp b/xbmc/interfaces/legacy/ModuleXbmc.cpp
index 59517bab9b..7bf9093fec 100644
--- a/xbmc/interfaces/legacy/ModuleXbmc.cpp
+++ b/xbmc/interfaces/legacy/ModuleXbmc.cpp
@@ -420,6 +420,13 @@ namespace XBMCAddon
result = g_langInfo.GetDateFormat(false);
StringUtils::Replace(result, "MM", "%m");
StringUtils::Replace(result, "DD", "%d");
+#ifdef TARGET_WINDOWS
+ StringUtils::Replace(result, "M", "%#m");
+ StringUtils::Replace(result, "D", "%#d");
+#else
+ StringUtils::Replace(result, "M", "%-m");
+ StringUtils::Replace(result, "D", "%-d");
+#endif
StringUtils::Replace(result, "YYYY", "%Y");
}
else if (strcmpi(id, "tempunit") == 0)