Can someone explain this odd javascript date output? -


https://jsfiddle.net/8cvhnwgs/1/

//new date(year, month, day, hours, minutes, seconds, milliseconds) $("#out").html(new date(2015, 5, 31, 08, 25, 30, 0)); 

the date give may 31st, outputs july first, can explain why? have used arguments wrong?

the month parameter date constructor 0 indexed, 5 june, has 30 days.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -