Reputation: 833
I found something strange in Explorer 11. Here is the code:
var d = new Date().toLocaleTimeString('en-US', { minute: "numeric"});
console.log(d);
Explorer 11 console: 6/14/2016 2:27:15 PM
Chrome console: 27
How can I get only the current minute with toLocalTimestring function in Explorer 11?
https://jsfiddle.net/34jd1zap/
Upvotes: 0
Views: 281
Reputation: 91
What about .getMinutes() method? =)
var minutes = (new Date()).getMinutes();
Upvotes: 3