JSFiddle - React, Tailwind, and code Playground

JavaScript

const year = 2023; // Please set year you expect.
const res = [...Array(12)].map((_, i) => [0, 1].map(e => new Date(year, i + e, 1 - e)));
console.log(res)

console.log(res.map(([a, b]) => [a.toDateString(), b.toDateString()]));