whiteCuts = days.map((d, i) => {
const x = dayScale(d, i);
const y = rowScale(d, i);
const time = d3.timeHour.offset(d, 12);
const { phase, angle } = suncalc.getMoonIllumination(time);
const lightAngle = 180 - phase * 360;
const darkAngle = 180 + lightAngle;
const [latitude, longitude] = coords;
const { parallacticAngle } = suncalc.getMoonPosition(
time,
latitude,
longitude
);
const rotationZ = ((angle - parallacticAngle) / TAU) * 360;
if (Math.abs(lightAngle) < 8) return '';
return (
projection.rotate([darkAngle, 0, rotationZ]).translate([x, y]),
path(hemisphere)
);
})