diff --git a/resources/settings/settings.xml b/resources/settings/settings.xml index 3ae67ae..5b7a3a7 100644 --- a/resources/settings/settings.xml +++ b/resources/settings/settings.xml @@ -406,8 +406,9 @@ @Strings.datef21 @Strings.datef3 @Strings.datef31 - @Strings.datef4 - @Strings.datef41 + @Strings.datef32 + @Strings.datef4 + @Strings.datef41 diff --git a/resources/strings/strings.xml b/resources/strings/strings.xml index 6a8b766..27f1392 100644 --- a/resources/strings/strings.xml +++ b/resources/strings/strings.xml @@ -81,13 +81,14 @@ Wind (Kmph or Mph) Date format - ddd d (TUE 2) - dd.mm (2.9) - mm.dd (9.2) - dd.mm.yy (2.9.19) - mm.dd.yy (9.2.19) - dd mmm (2 OCT) - mmm dd (OCT 2) + ddd d (TUE 31) + dd.mm (31.9) + mm.dd (9.31) + dd.mm.yy (31.9.19) + mm.dd.yy (9.31.19) + yy.mm.dd (19.9.31) + dd mmm (31 OCT) + mmm dd (OCT 31) Secondary timezone Shift timezone for +30min diff --git a/source/HuwaiiApp.mc b/source/HuwaiiApp.mc index 1d2b102..4284b9f 100644 --- a/source/HuwaiiApp.mc +++ b/source/HuwaiiApp.mc @@ -237,19 +237,21 @@ class HuwaiiApp extends Application.AppBase { } else if (date_formater == 2) { // mm/dd return Lang.format("$1$.$2$",[date.month.format("%d"), date.day.format("%d")]); - } else if (date_formater == 3) { - // dd/mm/yyyy + } else if (date_formater == 3 || date_formater == 4 || date_formater == 5) { var year = date.year; var yy = year/100.0; yy = Math.round((yy-yy.toNumber())*100.0); - return Lang.format("$1$.$2$.$3$",[date.day.format("%d"), date.month.format("%d"), yy.format("%d")]); - } else if (date_formater == 4) { - // mm/dd/yyyy - var year = date.year; - var yy = year/100.0; - yy = Math.round((yy-yy.toNumber())*100.0); - return Lang.format("$1$.$2$.$3$",[date.month.format("%d"), date.day.format("%d"), yy.format("%d")]); - } else if (date_formater == 5 || date_formater == 6) { + if (date_formater == 3) { + // dd.mm.yy + return Lang.format("$1$.$2$.$3$",[date.day.format("%d"), date.month.format("%d"), yy.format("%d")]); + } else if (date_formater == 4) { + // mm.dd.yy + return Lang.format("$2$.$1$.$3$",[date.day.format("%d"), date.month.format("%d"), yy.format("%d")]); + } else { + // yy.mm.dd + return Lang.format("$3$.$2$.$1$",[date.day.format("%d"), date.month.format("%d"), yy.format("%d")]); + } + } else if (date_formater == 6 || date_formater == 7) { // dd mmm var day = null; var month = null; @@ -261,7 +263,7 @@ class HuwaiiApp extends Application.AppBase { day = date.day; month = months[date.month]; } - if (date_formater == 5) { + if (date_formater == 6) { return Lang.format("$1$ $2$",[day.format("%d"), month]); } else { return Lang.format("$1$ $2$",[month, day.format("%d")]);