Check out example codes for "current date in html5". It will help you in understanding the concepts better.
Code Example 1
<script>
n = new Date();
y = n.getFullYear();
m = n.getMonth() + 1;
d = n.getDate();
document.getElementById("date").innerHTML = m + "/" + d + "/" + y;
</script>
<p id="date"></p>
Learn ReactJs, React Native from akashmittal.com