theme reorx: show only date for last modified

This commit is contained in:
Reorx 2023-02-11 23:50:53 +08:00
parent 39a121bd15
commit 4a8b53aff7
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
import dayjs from 'dayjs'; import dayjs from 'dayjs';
export function reformatDate(dateStr, format) { export function reformatDate(dateStr, toFormat, fromFormat = 'YYYY-MM-DD') {
return dayjs(dateStr).format(format) return dayjs(dateStr).format(toFormat)
} }

View File

@ -274,7 +274,7 @@ function dateRange(item, level) {
<div class="version">Version: <%= cv.meta.version %></div> <div class="version">Version: <%= cv.meta.version %></div>
<% } %> <% } %>
<% if (cv.meta.lastModified) { %> <% if (cv.meta.lastModified) { %>
<div class="version">Last modified: <%= cv.meta.lastModified %></div> <div class="version">Last modified: <%= cv.meta.lastModified.slice(0, 10) %></div>
<% } %> <% } %>
</footer> </footer>
<% } %> <% } %>