In .NET DateTime.Month returns the month as integer between 1 and 12. Corresponding thing in JavaScript is Date.getMonth() but values are from 0 to 11.
Ok, it is common to start indexing from zero but the confusing part is that JavaScript’s Date.getDate() returns values from 1 to 31 so it is not analogous to getMonth(). Be aware of that trap when playing with dates in JavaScript.