jquery get month 2 digits from given date month name code example Example: ecmascript 7 getmonth as 2 digits ("0" + (this.getMonth() + 1)).slice(-2)