-
Notifications
You must be signed in to change notification settings - Fork 0
/
sceipt.js
47 lines (21 loc) · 940 Bytes
/
sceipt.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
setInterval(() => {
let x = new Date();
let time = x.getHours() +":"+ x.getMinutes() +":"+ x.getSeconds();
document.getElementById("time").innerHTML= time ;
}, 1000);
let xx = new Date();
let day = document.getElementById("day");
let p = xx.getDay();
let days=["Saturday"+ ",", "Sunday"+ ",","Monday"+ "," ,"Tuessday"+ "," ,"Wednesday"+ "," ,"Thursday"+ ",", "Friday"+ ","];
day.innerHTML= days[p];
let month = document.getElementById("month");
let m = xx.getMonth();
let months = ["January","February","March","April","May","June","July","August","September", "October", "November","December"]
month.innerHTML= months[m];
let date = document.getElementById("date");
date.innerHTML=xx.getDate() + ",";
let year = document.getElementById("year");
year.innerHTML=xx.getFullYear();
// console.log(p);
// let month = x.getMonth() + 1 ;
// let time = x.getDate() +"/"+ month +"/"+ x.getFullYear() ;