This is a digital clock created utilizing HTML,CSS and Javascript.
This project utilizes the Date() object used to procure time and give alarm screen notifications in real time. It's fully responsive which is achieved through implementing media queries to the web design.
Usage of the Date() object which allows us to retreive values for hours, minutes, seconds, months and so on... in real time.
//object for date method
let obj=new Date();
let h=obj.getHours(); //For hours
let m=obj.getMinutes(); //For minutes
let s=obj.getSeconds(); //For seconds
Since we've created a digital clock, we'll only use hours, minutes and seconds for this. For more detailed and succint information you can use these resources:
- W3 Schools (https://www.w3schools.com/js/js_dates.asp)
- MDN Mozilla developer documentation (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)