remove moment. localize datetime

This commit is contained in:
Moriz Wahl 2022-01-20 14:44:40 +01:00
parent 4837aca0bd
commit f9b5df8720
4 changed files with 5 additions and 7 deletions

View File

@ -2,6 +2,7 @@
"all_emails": "Alle Nutzer", "all_emails": "Alle Nutzer",
"bookmark": "bookmark", "bookmark": "bookmark",
"confirmed": "bestätigt", "confirmed": "bestätigt",
"date": "Datum",
"creation_form": { "creation_form": {
"creation_for": "Schöpfung für", "creation_for": "Schöpfung für",
"enter_text": "Text eintragen", "enter_text": "Text eintragen",

View File

@ -2,6 +2,7 @@
"all_emails": "All users", "all_emails": "All users",
"bookmark": "Remember", "bookmark": "Remember",
"confirmed": "confirmed", "confirmed": "confirmed",
"date": "Date",
"creation_form": { "creation_form": {
"creation_for": "Creation for", "creation_for": "Creation for",
"enter_text": "Enter text", "enter_text": "Enter text",

View File

@ -38,6 +38,7 @@ const apolloMutateMock = jest.fn().mockResolvedValue({})
const mocks = { const mocks = {
$t: jest.fn((t) => t), $t: jest.fn((t) => t),
$d: jest.fn((d) => d),
$store: { $store: {
commit: storeCommitMock, commit: storeCommitMock,
}, },
@ -49,11 +50,6 @@ const mocks = {
error: toastedErrorMock, error: toastedErrorMock,
success: toastedSuccessMock, success: toastedSuccessMock,
}, },
$moment: jest.fn((value) => {
return {
format: jest.fn((format) => value),
}
}),
} }
describe('CreationConfirm', () => { describe('CreationConfirm', () => {

View File

@ -37,9 +37,9 @@ export default {
{ key: 'memo', label: 'Text' }, { key: 'memo', label: 'Text' },
{ {
key: 'date', key: 'date',
label: 'Datum', label: this.$t('date'),
formatter: (value) => { formatter: (value) => {
return this.$moment(value).format('ll') return this.$d(new Date(value), 'short')
}, },
}, },
{ key: 'moderator', label: 'Moderator' }, { key: 'moderator', label: 'Moderator' },