diff --git a/Clock/app.js b/Clock/app.js new file mode 100644 index 0000000..4c2fcee --- /dev/null +++ b/Clock/app.js @@ -0,0 +1,53 @@ + +var d=new Date(); +console.log([d.getDate(), d.getMonth()+1, d.getFullYear()].join('/')); + +function clock(){ + + var fullDate = new Date(); + var hrs=fullDate.getHours(); + var min=fullDate.getMinutes(); + var sec=fullDate.getSeconds(); + + var week=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; + var day=fullDate.getDate(); + var month=fullDate.getMonth()+1; + var year=fullDate.getFullYear(); + var weekday=fullDate.getDay(); + + if(hrs<10){ + hrs="0"+hrs; + } + + if(min<10){ + min="0"+min; + } + + if(sec<10){ + sec="0"+sec; + } + + + if(day<10){ + day="0"+day; + } + + if(month<10){ + month="0"+month; + } + + + document.getElementById('hrs').innerHTML=hrs; + document.getElementById('mins').innerHTML=":"+min; + document.getElementById('secs').innerHTML=":"+sec; + + + document.getElementById('day').innerHTML=day; + document.getElementById('month').innerHTML="/"+month; + document.getElementById('year').innerHTML="/"+year; + + document.getElementById('weekday').innerHTML=week[weekday]; + +} + +setInterval(clock,1000); diff --git a/Clock/clock.html b/Clock/clock.html new file mode 100644 index 0000000..d1e9bfa --- /dev/null +++ b/Clock/clock.html @@ -0,0 +1,30 @@ + + + Date time + + + + +
+ + + + +
+ +
+ + + +
+ + +
+ + + + + + + + \ No newline at end of file diff --git a/Clock/joker.jpg b/Clock/joker.jpg new file mode 100644 index 0000000..a42ca2c Binary files /dev/null and b/Clock/joker.jpg differ diff --git a/Clock/styles.css b/Clock/styles.css new file mode 100644 index 0000000..661750e --- /dev/null +++ b/Clock/styles.css @@ -0,0 +1,34 @@ + +*{ + margin-top: 0; + margin-left: 0; + +} + +body{ + background: url("joker.jpg"); + background-size: cover; + background-repeat: no-repeat; + background-position: center center; +} + +#time{ + color:white; + margin-top:250px; + margin-left: 170px; + font-size: 60px; + font-family: 'Orbitron', sans-serif; + +} +#date{ + color:white; + margin-left:1030px; + font-size: 60px; + margin-top:-68px; + font-family: 'Orbitron', sans-serif; +} + +#weekday{ + font-size:35px; + +}