fix(formatdate): always replace mm by MM for babel.dates
This commit is contained in:
parent
c0ba708ee5
commit
1f1a1ec810
1 changed files with 2 additions and 1 deletions
|
|
@ -223,7 +223,8 @@ def formatdate(string_date=None, format_string=None):
|
|||
|
||||
date = getdate(string_date)
|
||||
if not format_string:
|
||||
format_string = get_user_format().replace("mm", "MM")
|
||||
format_string = get_user_format()
|
||||
format_string = format_string.replace("mm", "MM")
|
||||
try:
|
||||
formatted_date = babel.dates.format_date(date, format_string, locale=(frappe.local.lang or "").replace("-", "_"))
|
||||
except UnknownLocaleError:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue