diff --git a/html/fm.html b/html/fm.html index 6a85f6fab7..ec224ec6af 100644 --- a/html/fm.html +++ b/html/fm.html @@ -3663,6 +3663,12 @@
[$19929]
+
+
+ +
+
[$25082]
+
diff --git a/js/utils/locale.js b/js/utils/locale.js index 340741677f..b6d231fb72 100755 --- a/js/utils/locale.js +++ b/js/utils/locale.js @@ -285,6 +285,10 @@ function setDateTimeFormat(locales, format) { * 14: 2021 (Only year) * 15: dd mm (Date format with short month and without time and year) * 16: dd (Only day) + * + * Note: When `fmconfig.uidateformat` is `2`, short date formats (0, 1) are rendered + * as dd.mm.yyyy (or dd.mm.yyyy hh:mm) regardless of locale, the same way + * `uidateformat === 1` forces the ISO yyyy-mm-dd rendering. */ function time2date(unixTime, format) { 'use strict'; @@ -310,10 +314,22 @@ function time2date(unixTime, format) { return isodate.toISOString().replace('T', ' ').substr(0, length); }; + // print time as dd.mm.yyyy (or dd.mm.yyyy hh:mm) date format + var printDMY = function _printDMY() { + var isodate = printISO(); + var datePart = isodate.substr(0, 10).split('-'); + var dmy = datePart[2] + '.' + datePart[1] + '.' + datePart[0]; + + return format === 0 ? dmy + isodate.substr(10) : dmy; + }; + dateFunc = dFObj === 'ISO' ? printISO : dFObj.format; - // if it is short date format and user selected to use ISO format - if ((fmconfig.uidateformat || countryAndLocales.country === 'ISO') && format < 2) { + // if it is short date format and user selected to use ISO or DD.MM.YYYY format + if (format < 2 && fmconfig.uidateformat === 2) { + result = printDMY(); + } + else if ((fmconfig.uidateformat || countryAndLocales.country === 'ISO') && format < 2) { result = printISO(); } else { diff --git a/lang/en_prod.json b/lang/en_prod.json index b99d64afb5..738bb9c1aa 100644 --- a/lang/en_prod.json +++ b/lang/en_prod.json @@ -2613,6 +2613,7 @@ "25049": "Payment failed", "25050": "Unfortunately, the payment did not go through. If you believe that this is an error on MEGA\u2019s part, please contact support at [A]https://mega.nz/support[/A]", "25081": "Thanks. Your account upgrade will be applied in the next few minutes.\nIf this is a new account and you haven\u2019t verified your email address yet, please do this now.", + "25082": "Use the day, month, year format (DD.MM.YYYY)", "about_no_vacancies_available": "No vacancies available currently.", "about_our_promise_title": "Our promise", "ac_closure_email_sent_msg": "An email was sent to %s with a link to close your account.",