You are browsing as a guest. Sign up (or log in) to start making projects!

18m 13s logged

“Added live Clock and Date for CosmoTab” Today I implemented a clock and date display for my CosmoTab new tab page. I added two divs with ids clock and date in index.html.In script.js, I wrote an updateClock() function that uses Date() to get the current time and formats it with toLocaleTimeString(). For the date, I use toLocaleDateString() with options to show the weekday, month, day, and year.I styled the clock and date in style.css so they stand out and use a readable font. Now when I open my new tab, I see the current time and date updating every second.Next, I plan to add a personalized greeting based on time of day and start designing the layout with a space-themed background.

0
2

Comments 0

No comments yet. Be the first!