-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patha3.html
More file actions
45 lines (41 loc) · 1.01 KB
/
a3.html
File metadata and controls
45 lines (41 loc) · 1.01 KB
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
<!--assignment3 GETTING THE CURRENT DATE -->
<html>
<head>
<font color="magenta">
<font size="10">
<center> GETTING THE CURRENT DATE</center>
</font>
</font>
<title>Assignment3</title>
</head>
<body bgcolor="darkgreen">
<center>
<font color="orange">
<font size="5">
<script>
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1;
var yyyy = today.getFullYear();
if(dd<10)
{
dd='0'+dd;
}
if(mm<10)
{
mm='0'+mm;
}
today = mm+'-'+dd+'-'+yyyy;
document.write("<p>mm-dd-yyyy : "+today);
today = mm+'/'+dd+'/'+yyyy;
document.write("<p>mm/dd/yyyy : "+today);
today = dd+'-'+mm+'-'+yyyy;
document.write("<p>dd-mm-yyyy : "+today);
today = dd+'/'+mm+'/'+yyyy;
document.write("<p>dd/mm/yyyy : "+today);
</script>
</center>
</font>
</font>
</body>
</html>