9

*So I have a function where the date is formatted as 20180317 and get returned if I pass a date to it.*
Junior Dev: I'm selecting March as a month but it's showing 20180217 and not 20180317, what should I do?
Me: I've written function for formatting date just go there and there will be date.getMonth() just add 1 to it by doing +1.
Junior Dev: It's still not working!!!.
So I went there and checked what she did, and she did this .....
date.getMonth(+1);

Comments
Add Comment