Skip to content

Commit

Permalink
fix: update countdown times
Browse files Browse the repository at this point in the history
  • Loading branch information
themightychris committed Nov 11, 2024
1 parent 4a3caf2 commit 0131e6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/CountdownBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const hoursLeft = ref(0)
const minutesLeft = ref(0)
const percentComplete = ref(0)
const startDate = new Date('2024-11-09T00:00:00')
const endDate = new Date('2024-11-12T00:00:00')
const startDate = new Date('2024-11-11T00:00:00')
const endDate = new Date('2024-11-13T00:00:00')
const totalDuration = endDate - startDate
function updateCountdown() {
Expand All @@ -23,7 +23,7 @@ function updateCountdown() {
hoursLeft.value = Math.floor(timeLeft / (1000 * 60 * 60))
minutesLeft.value = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60))
percentComplete.value = Math.min(100, Math.max(0, (elapsed / totalDuration) * 100))
percentComplete.value = Math.min(100, Math.max(0, (timeLeft / totalDuration) * 100))
}
let interval
Expand Down

0 comments on commit 0131e6e

Please sign in to comment.