Skip to content

Commit 0131e6e

Browse files
fix: update countdown times
1 parent 4a3caf2 commit 0131e6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/CountdownBar.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const hoursLeft = ref(0)
55
const minutesLeft = ref(0)
66
const percentComplete = ref(0)
77
8-
const startDate = new Date('2024-11-09T00:00:00')
9-
const endDate = new Date('2024-11-12T00:00:00')
8+
const startDate = new Date('2024-11-11T00:00:00')
9+
const endDate = new Date('2024-11-13T00:00:00')
1010
const totalDuration = endDate - startDate
1111
1212
function updateCountdown() {
@@ -23,7 +23,7 @@ function updateCountdown() {
2323
2424
hoursLeft.value = Math.floor(timeLeft / (1000 * 60 * 60))
2525
minutesLeft.value = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60))
26-
percentComplete.value = Math.min(100, Math.max(0, (elapsed / totalDuration) * 100))
26+
percentComplete.value = Math.min(100, Math.max(0, (timeLeft / totalDuration) * 100))
2727
}
2828
2929
let interval

0 commit comments

Comments
 (0)