mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Resolve #760
This commit is contained in:
parent
c27e231f53
commit
d0db7f5ce3
47 changed files with 95 additions and 18 deletions
|
|
@ -4,6 +4,7 @@ import { langLink } from 'Common/Links';
|
|||
import { doc, createElement } from 'Common/Globals';
|
||||
import { getKeyByValue, forEachObjectEntry } from 'Common/Utils';
|
||||
import { pInt } from 'Common/Utils';
|
||||
import { LanguageStore } from 'Stores/Language';
|
||||
|
||||
let I18N_DATA = {};
|
||||
|
||||
|
|
@ -87,17 +88,17 @@ export const
|
|||
const mt = m.getTime(), date = new Date,
|
||||
dt = date.setHours(0,0,0,0);
|
||||
if (mt > dt)
|
||||
return i18n('MESSAGE_LIST/TODAY_AT', {TIME: m.format('LT')});
|
||||
return i18n('MESSAGE_LIST/TODAY_AT', {TIME: m.format('LT',0,LanguageStore.hourCycle())});
|
||||
if (mt > dt - 86400000)
|
||||
return i18n('MESSAGE_LIST/YESTERDAY_AT', {TIME: m.format('LT')});
|
||||
return i18n('MESSAGE_LIST/YESTERDAY_AT', {TIME: m.format('LT',0,LanguageStore.hourCycle())});
|
||||
if (date.getFullYear() === m.getFullYear())
|
||||
return m.format('d M');
|
||||
return m.format('LL');
|
||||
return m.format('LL',0,LanguageStore.hourCycle());
|
||||
}
|
||||
case 'FULL':
|
||||
return m.format('LLL');
|
||||
return m.format('LLL',0,LanguageStore.hourCycle());
|
||||
default:
|
||||
return m.format(formatStr);
|
||||
return m.format(formatStr,0,LanguageStore.hourCycle());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue