Skip to content
Advertisement

dd/mm/yyyy vs dd/MM/yyyy?

JavaScript

Result is todays date i.e 23/03/2014

But when i do

JavaScript

result can be 23/05/2014, 23/05/2014, 23/06/2014 and son with each run of prgram. Why so?

Advertisement

Answer

It’s because mm is for minutes, not months. More in the documentation.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement