From efbd10a908a999e785ce76cbe95fec5a901c4582 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 11 May 2017 10:07:15 +0530 Subject: [PATCH] Fix rendering of short month names incorrect on Chrome --- src/pyj/date.pyj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyj/date.pyj b/src/pyj/date.pyj index 2c267c215c..120d339cff 100644 --- a/src/pyj/date.pyj +++ b/src/pyj/date.pyj @@ -64,7 +64,7 @@ def fd_format_day(dt, ampm, dy, as_utc): options = {'weekday': ('short' if dy.length is 3 else 'long')} if as_utc: options['timeZone'] = 'UTC' - return dt.toLocaleString(undefined, options) + return dt.toLocaleString(window.navigator.language, options) w = dt.getUTCDay() if as_utc else dt.getDay() return lcdata['abday' if dy.length is 3 else 'day'][(w + 1) % 7] @@ -78,7 +78,7 @@ def fd_format_month(dt, ampm, mo, as_utc): options = {'month': {1:'numeric', 2:'2-digit', 3:'short', 4:'long'}[mo.length] or 'long'} if as_utc: options['timeZone'] = 'UTC' - return dt.toLocaleString(undefined, options) + return dt.toLocaleString(window.navigator.language, options) return lcdata['abmon' if mo.length is 3 else 'mon'][m] def fd_format_year(dt, ampm, yr, as_utc):