body {
  white-space: pre;
}
const generateComponentExtractor = (componentMax, modBase) => (
    value => Math.floor(value / modBase) % componentMax
  ),
  extractors = {
    second: generateComponentExtractor(60, 1),
    minute: generateComponentExtractor(60, 60),
    hour: generateComponentExtractor(24, 60 * 60),
    day: generateComponentExtractor(365, 60 * 60 * 24),
    year: generateComponentExtractor(Infinity, 60 * 60 * 24 * 365)
  },
  components = ["year", "day", "hour", "minute", "second"],

  intervalToString = value =>
    components
      .map(cmpt => {
        const cmptValue = extractors[cmpt](value);
        return cmptValue && `${cmptValue} ${cmpt}${cmptValue > 1 ? "s" : ""}`;
      })
      .filter(v => v)
      .reduce(
        (acc, cmptString, index, array) => (
          acc +
          (!index ? "" : index < array.length - 1 ? ", " : " and ") +
          cmptString
        ), ""
      );

document.body.textContent = [62, 3662, 66711841, 31539601, 120].map(v=>(
  `${v} -> ${intervalToString(v)}`
)).join('\n')

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.