-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs11.html
28 lines (28 loc) · 904 Bytes
/
js11.html
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>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta http-equiv="X-UA-Compatible"content="ie-edge">
<title>javascript dates</title>
</head>
<body>
<div class="container">
this is a container
</div>
<script>
console.log("this is date and time tutorail")
let new_date = new Date("2023-12-04");
//let new_date = new Date(3020,4,5,8,9,5,12);
let yr= new_date.getFullYear();
// similarly we Have;
// getHours
// getMonth
// getDate
console.log("full year is ",yr)
console.log(new_date)
new_date.setDate(12)
console.log(new_date)
</script>
</body>
</html>