Getting the previous month’s first date from current date in JavaScript March 11, 2023 by Tarik Straightforward enough, with the date methods: var x = new Date(); x.setDate(1); x.setMonth(x.getMonth()-1);