r/ProgrammerHumor • • Dec 31 '14

How to add two numbers in JavaScript

1.7k Upvotes

270 comments sorted by

View all comments

Show parent comments

2

u/mvaneerde Dec 31 '14

Where did the 08 come from? Are you parsing a date manually?

1

u/Hydrothermal Dec 31 '14

I've never personally had this problem. I imagine somebody trying to parse user input could end up with it.

1

u/the_omega99 Dec 31 '14

Presumably. That, or a time.

Questionable why they'd do that, since the Date object can do better here, but not necessarily bad practice (assuming that you know the date format won't change).