clause fixes #16
No files matched your search
@@ -316,8 +316,11 @@ async function loadBoard() {
|
||||
|
||||
// If we know the exact epoch day and haven't set date text yet, show it
|
||||
if (finalEpoch !== null && !dateEl.textContent) {
|
||||
// Epoch days start at midnight UTC, so format in UTC or viewers
|
||||
// west of UTC see the previous day
|
||||
dateEl.textContent = new Date(finalEpoch * 86400 * 1000)
|
||||
.toLocaleDateString(undefined, {
|
||||
timeZone: "UTC",
|
||||
weekday: "long",
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
|
||||
@@ -134,8 +134,11 @@
|
||||
|
||||
<script>
|
||||
function formatDateFromEpochDays(epochDays) {
|
||||
// Epoch days start at midnight UTC, so format in UTC or viewers
|
||||
// west of UTC see the previous day
|
||||
const date = new Date(epochDays * 86400 * 1000);
|
||||
return date.toLocaleDateString(undefined, {
|
||||
timeZone: "UTC",
|
||||
weekday: "short",
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
|
||||
Reference in new issue
Block a user