Can I create an analog clock cum digital clock instead of this digital-only one? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can I create an analog clock cum digital clock instead of this digital-only one?

https://code.sololearn.com/W1e22ebMcX3A/?ref=app

4th Jul 2018, 3:58 PM
B.D
B.D - avatar
9 Answers
+ 3
Here an analog clock, clock formed by CSS only, without canvas. Use Javascript to update clock https://code.sololearn.com/Wc8Rn6aM8Y33/?ref= app
5th Jul 2018, 4:33 AM
CalviÕ²
CalviÕ² - avatar
+ 2
thanks
5th Jul 2018, 9:07 AM
B.D
B.D - avatar
+ 1
Use canvas to draw the clock and update the angles of the hands every second
4th Jul 2018, 4:05 PM
TurtleShell
TurtleShell - avatar
+ 1
How can I update?
4th Jul 2018, 4:51 PM
B.D
B.D - avatar
+ 1
Redraw the clock
4th Jul 2018, 4:52 PM
TurtleShell
TurtleShell - avatar
+ 1
How will I install the current time?
4th Jul 2018, 4:55 PM
B.D
B.D - avatar
+ 1
Use the Date() object and call your custom update() function
4th Jul 2018, 4:57 PM
TurtleShell
TurtleShell - avatar
+ 1
Can I animate the clock body if I use canvas in the code?
4th Jul 2018, 4:58 PM
B.D
B.D - avatar
+ 1
Hi Bithi D, Start here: https://www.w3schools.com/graphics/canvas_clock.asp and follow the tutorial all the way through. I hope this helps! :)
4th Jul 2018, 11:06 PM
Janningā­
Janningā­ - avatar