getMinutes() method in Javascript
How to get the current minute in Javascript?
Object:
Explanation
Object: Date
Method: getMinutes()
Description: This function will return the current minute of the hour. The minutes are displayed as integer values between 0 to 59.
Example Code:
<script type="text/javascript">
var x=new Date();
var y=x.getMinutes();
if (y<=30)
{
document.write('Minutes of first half hour');
}
else
{
document.write('Minutes of second half hour');
}
</script>
Result:
Explanation:
In the above example,