Getting wrong month in moment.js

javascript, momentjs

Solution

According to Moment.js documentation, 'month' uses an array and the indices of an array are zero-based. Therefore, January is set to '0' and December is set to '11'.

For example, `moment().month('November');` prints '10'.

Problem

I'm using Moment.js included through RequireJS. When I call `Moment().month()`, instead of number 11 I always get number 10. Any ideas how can this happen?

Original source