javascript date get 2 digit month code example Example: get month in two digit in javascript date ("0" + (this.getMonth() + 1)).slice(-2)