File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ < html >
2
+
3
+ < head >
4
+ < title > Imp days of Imran </ title >
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1,user-scalable=no ">
6
+ < meta http-equiv ="Cache-control " content ="public ">
7
+ < link rel ="stylesheet " type ="text/css " href ="css/style.css ">
8
+ < link rel ="stylesheet " type ="text/css " href ="css/util.css ">
9
+ < link rel ="stylesheet " type ="text/css " href ="css/all.min.css ">
10
+ < link href ="https://fonts.googleapis.com/icon?family=Material+Icons " rel ="stylesheet ">
11
+ <!--Import materialize.css-->
12
+ < link type ="text/css " rel ="stylesheet " href ="css/materialize.css " media ="screen,projection " />
13
+ < script type ="text/javascript " src ="js/jquery.min.js "> </ script >
14
+ < script type ="text/javascript " src ="js/materialize.js "> </ script >
15
+ < script type ="text/javascript " src ="js/app.js "> </ script >
16
+ </ head >
17
+
18
+ < body >
19
+ </ body >
20
+ < div >
21
+
22
+ < p style ="display: inline;color: red; "> Days Since Marriage - </ p >
23
+ < p id ="days_marriage " style ="display: inline;color: green; "> </ p >
24
+ </ div >
25
+ < script >
26
+ $ ( document ) . ready ( function ( ) {
27
+ const marriageDate = new Date ( '06/23/2019' ) ;
28
+ const currentDate = new Date ( ) ;
29
+ const diffTime = Math . abs ( currentDate . getTime ( ) - marriageDate . getTime ( ) ) ;
30
+ const diffDays = Math . ceil ( diffTime / ( 1000 * 60 * 60 * 24 ) ) ;
31
+ console . log ( diffDays ) ;
32
+ document . getElementById ( "days_marriage" ) . innerHTML = diffDays ;
33
+ } ) ;
34
+
35
+ </ script >
36
+ </ html >
You can’t perform that action at this time.
0 commit comments