Hour and Minutes togheter in Javascript
Posted: 21 Jan 2022, 17:53
Dear Coursesweb I can not find out how to add the hours + minutes togheter.
I would like to have both in one ???? hr + mn ????
This is the exmple what is working seperated
Code: Select all
<SCRIPT LANGUAGE="JavaScript">
day = new Date()
hr = day.getHours()
mn = day.getMinutes()
se = day.getSeconds()
</SCRIPT>
Code: Select all
hr = day.getHours()
mn = day.getMinutes()
miho = hr,mn ?????????????????????
Code: Select all
if (hr == 1) document.write("Het is na enen. nog niet naar bed?")
if (se == 1) document.write("<br>1 Wat gaat er gebeuren ?")
if (mn == 52) document.write("Na22222zessen. De afwas al gedaan?")