diff --git a/src/main/resources/site/content-types/statistics/statistics.xml b/src/main/resources/site/content-types/statistics/statistics.xml index 16e7f8316..f2e0d8aad 100644 --- a/src/main/resources/site/content-types/statistics/statistics.xml +++ b/src/main/resources/site/content-types/statistics/statistics.xml @@ -15,6 +15,10 @@ true + + + unchecked + @@ -134,4 +138,4 @@ - \ No newline at end of file + diff --git a/src/main/resources/site/parts/statistics/statistics.ts b/src/main/resources/site/parts/statistics/statistics.ts index 177d1372b..c1974e21c 100644 --- a/src/main/resources/site/parts/statistics/statistics.ts +++ b/src/main/resources/site/parts/statistics/statistics.ts @@ -65,6 +65,7 @@ function renderPart(req: XP.Request): XP.Response { const modifiedText: string | undefined = page.data.showModifiedDate ? page.data.showModifiedDate.modifiedOption.modifiedText : undefined + const showModifiedTime: boolean | undefined = page.data.showModifiedDate?.modifiedOption.showModifiedTime const modifiedDate: string | undefined = page.data.showModifiedDate ? page.data.showModifiedDate.modifiedOption.lastModified : undefined @@ -118,7 +119,8 @@ function renderPart(req: XP.Request): XP.Response { if (page.data.showModifiedDate && previousReleaseDate && modifiedDate) { if (isAfter(new Date(modifiedDate), new Date(previousReleaseDate))) { - changeDate = formatDate(modifiedDate, 'PPp', language) + const dateFormat = showModifiedTime ? 'PPp' : 'PPP' + changeDate = formatDate(modifiedDate, dateFormat, language) } }