Node module to fetch/post API data
var todayDate = moment().format('DD').replace(/^0+/, ''); // "1"


Looks like you're taking a zero-padded day of month here... and then stripping off the leading zero.

You should use moment().format('D'), it will give you day of month without a leading zero.

Aside from that... you shouldn't use multiple instances of moment(). What if the time changes between the two lines of code? You might get things like 31 February.

var todayMoment = moment();

var todayDay = todayMoment.format('dddd'); // ["Monday"]
var todayDate = todayMoment.format('D'); // "1"
var todayMonth = todayMoment.format('MMMM'); // ["January"]


Like so, both problems are fixed.