yest label check

This commit is contained in:
Yuri Kuznetsov
2024-10-07 11:14:27 +03:00
parent 58cf137237
commit 4ff67f11ed
+5 -1
View File
@@ -73,7 +73,11 @@ class DatetimeShortFieldView extends DatetimeFieldView {
'yesterday': [dt.add(-3, 'days').unix(), dt.add(1, 'days').unix()]
};
if (m.unix() > ranges['yesterday'][0] && m.unix() < ranges['yesterday'][1]) {
if (
m.unix() > ranges['yesterday'][0] &&
m.unix() < ranges['yesterday'][1] &&
this.getLanguage().has('yesterdayShort', 'strings', 'Global')
) {
return this.translate('yesterdayShort', 'strings') + ' ' + m.format(timeFormat);
}