1930: Calendar Facts

HTML

<p id="fact"></p>

JavaScript

function RIFI(min, max) {
    return Math.floor(Math.random() * (max - min + 1) + min);
}

function generateFact() {
	let output = '';
  const firstWords = ['Did you know that '];
  const secondWords = ['the fall equinox ', 'the spring equinox ', 'the summer olympics ', 'the summer solstice ', 'the winter olympics ', 'the winter solstice ', 'the earliest sunrise ', 'the earliest sunset ', 'the latest sunrise ', 'the latest sunset ', 'daylight savings time ', 'daylight saving time ', 'leap day ', 'leap year ', 'Easter ', 'Toyota Truck Month ', 'Shark Week '];
  const dv = ['sun ', 'moon ', 'zodiac ', 'gregorian calendar ', 'mayan calendar ', 'lunar calendar ', 'iPhone calendar ', 'atomic clock in Colorado '];
  const thirdWords = ['happens earlier every year ', 'happens later every year ', 'happens at the wrong time every year ', 'drifts out of sync with the ' + dv[RIFI(0, dv.length - 1)], 'might not happen this year ', 'might happen twice this year '];
  const fourthWords = ['because of '];
  const fvone = ['precession ', 'liberation ', 'nutation ', 'libation ', 'eccentricity ', 'obliquity '];
  const fvtwo = ['Moon ', 'Sun ', 'Earth\'s axis ', 'Equator ', 'Prime Meridian ', 'International Date Line ', 'Mason-Dixon Line'];
  const fifthWords = ['time zone legislation in Indiana ', 'time zone legislation in Russia ', 'time zone legislation in Arizona ', 'a decree by the Pope in the 1500s ', fvone[RIFI(0, fvone.length)] + 'of the ' + fvtwo[RIFI(0, fvtwo.length)], 'magnetic field reversal ', 'an arbitrary decision by Benjamin Franklin ', 'an arbitrary decision by Isaac Newton ', 'an arbitrary decision by FDR '];
  const sixthWords = [' — apparently, '];
  const svone = ['will never happen.', 'actually makes things worse.', 'is stalled in congress.', 'may be unconstitutional.'];
  const svtwo = ['Bronze Age.', 'Ice Age.', 'Cretaceous.', '1990s.'];
  const seventhWords = ['it causes a predictable increase in car accidents.', 'that\'s why we have leap seconds.',...