How do I get the correct month number in moment js?
const now = new Date();
const formatedDateAppend = moment(now).format('D-M-YYYY');
console.log(formatedDateAppend);
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.js"></script>
It's October now. But instead of 4.9.2018, it outputs 4.10.2018.
How can I make the month number start with 1 instead of 0?
0
1 answers
3
Author: nilecrocodile, 2018-10-04 13:39:48