Skip to content

Commit

Permalink
Merge pull request bradtraversy#48 from jaumemy/patch-2
Browse files Browse the repository at this point in the history
Fixing the hands
  • Loading branch information
bradtraversy committed Jul 31, 2021
2 parents 584c1b9 + d1aa35a commit a6ff11c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions theme-clock/script.js
Expand Up @@ -30,9 +30,9 @@ function setTime() {
const seconds = time.getSeconds()
const ampm = hours >= 12 ? 'PM' : 'AM'

hourEl.style.transform = `translate(-50%, -100%) rotate(${scale(hoursForClock, 0, 11, 0, 360)}deg)`
minuteEl.style.transform = `translate(-50%, -100%) rotate(${scale(minutes, 0, 59, 0, 360)}deg)`
secondEl.style.transform = `translate(-50%, -100%) rotate(${scale(seconds, 0, 59, 0, 360)}deg)`
hourEl.style.transform = `translate(-50%, -100%) rotate(${scale(hoursForClock, 0, 12, 0, 360)}deg)`
minuteEl.style.transform = `translate(-50%, -100%) rotate(${scale(minutes, 0, 60, 0, 360)}deg)`
secondEl.style.transform = `translate(-50%, -100%) rotate(${scale(seconds, 0, 60, 0, 360)}deg)`

timeEl.innerHTML = `${hoursForClock}:${minutes < 10 ? `0${minutes}` : minutes} ${ampm}`
dateEl.innerHTML = `${days[day]}, ${months[month]} <span class="circle">${date}</span>`
Expand Down

0 comments on commit a6ff11c

Please sign in to comment.