javascript - After converting the string date into a general time format, it is found that numbers less than 10 will not automatically add 0 in front, as follows
大家讲道理
2017-06-26 10:56:49
Do not use string splicing (less than 10, manually add 0 in front), are there any other methods?
Usually you don’t just write a JS paragraph to judge. If it’s less than 10, add a 0 in front