fix(content-docs): format last update date as "Jun 19, 2020" (#7673)

* consistent date formatting betweeen docs and blog

* update error message

* use short month names

Co-authored-by: Joe Harrison <jharrison@drwuk.com>
This commit is contained in:
Joe Harrison 2022-06-29 17:19:29 +01:00 committed by GitHub
parent 2910f99bbc
commit 825211f41d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 7 deletions

View file

@ -457,7 +457,7 @@ describe('simple site', () => {
unrelated_front_matter: "won't be part of metadata",
},
lastUpdatedAt: 1539502055,
formattedLastUpdatedAt: '10/14/2018',
formattedLastUpdatedAt: 'Oct 14, 2018',
lastUpdatedBy: 'Author',
tags: [],
});
@ -518,7 +518,7 @@ describe('simple site', () => {
title: 'Custom Last Update',
},
lastUpdatedAt: new Date('1/1/2000').getTime() / 1000,
formattedLastUpdatedAt: '1/1/2000',
formattedLastUpdatedAt: 'Jan 1, 2000',
lastUpdatedBy: 'Custom Author',
sidebarPosition: undefined,
tags: [],
@ -557,7 +557,7 @@ describe('simple site', () => {
title: 'Last Update Author Only',
},
lastUpdatedAt: 1539502055,
formattedLastUpdatedAt: '10/14/2018',
formattedLastUpdatedAt: 'Oct 14, 2018',
lastUpdatedBy: 'Custom Author',
sidebarPosition: undefined,
tags: [],
@ -596,7 +596,7 @@ describe('simple site', () => {
title: 'Last Update Date Only',
},
lastUpdatedAt: new Date('1/1/2000').getTime() / 1000,
formattedLastUpdatedAt: '1/1/2000',
formattedLastUpdatedAt: 'Jan 1, 2000',
lastUpdatedBy: 'Author',
sidebarPosition: undefined,
tags: [],