function interval(then, now) {
if (then <= now) throw new Error("Time’s up!");
let t = now;
let years = d3.timeYear.count(now, then);
if ((t = d3.timeYear.offset(t, years)) > then) t = d3.timeYear.offset(t, -1), --years;
let months = d3.timeMonth.count(t, then);
if ((t = d3.timeMonth.offset(t, months)) > then) t = d3.timeMonth.offset(t, -1), --months;
let days = d3.timeDay.count(t, then);
if ((t = d3.timeDay.offset(t, days)) > then) t = d3.timeDay.offset(t, -1), --days;
let hours = d3.timeHour.count(t, then);
if ((t = d3.timeHour.offset(t, hours)) > then) t = d3.timeHour.offset(t, -1), --hours;
let minutes = d3.timeMinute.count(t, then);
if ((t = d3.timeMinute.offset(t, minutes)) > then) t = d3.timeMinute.offset(t, -1), --minutes;
let seconds = d3.timeSecond.count(t, then);
if ((t = d3.timeSecond.offset(t, seconds)) > then) t = d3.timeSecond.offset(t, -1), --seconds;
return {years, months, days, hours, minutes, seconds};
}