0👍
Convert the number to date and format it to “HH:mm”
var theHour = [3,15,16];
console.log(moment(new Date(0, 0, 0, theHour[0], 0, 0, 0)).format("HH:mm"));
console.log(moment(new Date(0, 0, 0, theHour[1], 0, 0, 0)).format("HH:mm"));
console.log(moment(new Date(0, 0, 0, theHour[2], 0, 0, 0)).format("hh:mm A"));
<script src="https://momentjs.com/downloads/moment.js"></script>
- Chartjs-I am trying to rotate an ellipse with an arbitrary angle in JavaScript. But the outcome is not even an ellipse
- Chartjs-On hover / click change background color for the same bar on multiple charts – chart.js
Source:stackexchange.com