Skip to content

Commit

Permalink
Short date
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxwellBo committed Oct 4, 2024
1 parent 714cc33 commit 07aa71d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ <h1 class="title">@celine/celine</h1>
<td class="width-auto"><a href="https://maxbo.me">Max Bo</a></td>
<th>Updated</th>
<!-- these should be updated to the best of your ability -->
<td class="width-min"><time style="white-space: pre;" id="updated">Tue Sep 17 2024</time></td>
<td class="width-min"><time style="white-space: pre;" id="updated">Sep 17 2024</time></td>
</tr>
<tr>
<th>GitHub</th>
Expand All @@ -114,7 +114,9 @@ <h1 class="title">@celine/celine</h1>
.then(d => d.json())
.then(resp => {
document.getElementById("version").textContent = resp["dist-tags"].latest;
document.getElementById("updated").textContent = new Date(resp.time.modified).toDateString();
const date = new Date(resp.time.modified);
const formattedDate = `${date.toLocaleString('default', { month: 'short' })} ${date.getDate()} ${date.getFullYear()}`;
document.getElementById("updated").textContent = formattedDate;
})
</script>

Expand Down

0 comments on commit 07aa71d

Please sign in to comment.