-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdays.html
More file actions
36 lines (32 loc) · 1.38 KB
/
days.html
File metadata and controls
36 lines (32 loc) · 1.38 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
<html>
<head>
<title> Imp days of Imran </title>
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<meta http-equiv="Cache-control" content="public">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/all.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="css/materialize.css" media="screen,projection" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/materialize.js"></script>
<script type="text/javascript" src="js/app.js"></script>
</head>
<body>
</body>
<div>
<p style="display: inline;color: red;">Days Since Marriage - </p>
<p id="days_marriage" style="display: inline;color: green;"></p>
</div>
<script>
$(document).ready(function() {
const marriageDate = new Date('06/23/2019');
const currentDate = new Date();
const diffTime = Math.abs(currentDate.getTime() - marriageDate.getTime());
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
console.log(diffDays);
document.getElementById("days_marriage").innerHTML= diffDays;
});
</script>
</html>