Skip to content

Commit d180875

Browse files
committed
Copyright year fetched automatically
1 parent bec3424 commit d180875

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

JS/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,7 @@ async function fetchData() {
4040
setTimeout(() => {
4141
fetchData();
4242
}, 1000);
43+
44+
const d=new Date();
45+
let year=d.getFullYear();
46+
document.querySelector(".year").innerHTML=year;

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,7 @@ <h3 class="contact-footer mt-5">Contact</h3>
19681968
<div class="row">
19691969
<div class="col-md-12">
19701970
<div class="copyright-content">
1971-
<p>Copyright © 2022 <a rel="nofollow" href="#">CodeIN Community</a> All Right Reserved</p>
1971+
<p>Copyright © <span class="year"></span> <a rel="nofollow" href="#">CodeIN Community</a> All Right Reserved</p>
19721972
</div>
19731973
</div>
19741974
</div>

0 commit comments

Comments
 (0)