To whomever stumbles here, there is now a function in browsers that handles this issue and includes preferences for many languages and regions.
See documentation for Intl.DateTimeFormat.prototype.formatRange() on MDN.
Example:
const date1 = new Date(Date.UTC(2023, 0, 10, 10))
const date2 = new Date(Date.UTC(2023, 0, 20, 10))
const fmten = new Intl.DateTimeFormat('en', {
year: 'numeric',
month: 'short',
day: 'numeric',
})
const fmtde = new Intl.DateTimeFormat('de', {
year: 'numeric',
month: 'short',
day: 'numeric',
})
console.log(fmten.formatRange(date1, date2))
// -> 'Jan 10 – 20, 1906'
console.log(fmtde.formatRange(date1, date2))
// -> '10.–20. Jan. 1906'