-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtry.html
More file actions
28 lines (26 loc) · 878 Bytes
/
try.html
File metadata and controls
28 lines (26 loc) · 878 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
// var date = new Date() ;
// // var t = new Date('2022-11-11T07:39:19.393Z') ;
// // alert(t - date) ;
// // var try1 = new Date((30*24*3600*1000)) ;
// // alert(try1)
// var try2 = new Date(date.getTime() + (30 *24 * 60 * 60 * 1000)) ;
// alert(try2) ;
let sec = 1628618888939
let time = new Date(sec)
let normalDate = new Date(sec).toLocaleString('en-GB',{timeZone:'UTC'}) ;
let try1 = new Date(normalDate);
alert(normalDate)
alert(try1.getDate() + "-" + (try1.getMonth() + 1)+ "-" + (try1.getFullYear())) ;
</script>
</body>
</html>