index.js
function jdnToEthiopic(jdn, era = JD_EPOCH_OFFSET_AMETE_MIHRET) {
  const r = mod((jdn - era), 1461);
  const n = mod(r, 365) + 365 * Math.floor(r / 1460);

  const year = 4 * Math.floor((jdn - era) / 1461) + Math.floor(r / 365) - Math.floor(r / 1460);
  const month = Math.floor(n / 30) + 1;
  const day = mod(n, 30) + 1;

  return { year, month, day };
}
function jdnToEthiopic(jdn, era = JD_EPOCH_OFFSET_AMETE_MIHRET) {
  const r = mod((jdn - era), 1461);
  const n = mod(r, 365) + 365 * Math.floor(r / 1460);

  const year = 4 * Math.floor((jdn - era) / 1461) + Math.floor(r / 365) - Math.floor(r / 1460);
  const month = Math.floor(n / 30) + 1;
  const day = mod(n, 30) + 1;

  return { year, month, day };
}
function jdnToEthiopic ( jdn , era = JD_EPOCH_OFFSET_AMETE_MIHRET ) { const r = mod ( ( jdn - era ) , 1461 ) ; const n = mod ( r , 365 ) + 365 * Math . floor ( r / 1460 ) ; const year = 4 * Math . floor ( ( jdn - era ) / 1461 ) + Math . floor ( r / 365 ) - Math . floor ( r / 1460 ) ; const month = Math . floor ( n / 30 ) + 1 ; const day = mod ( n , 30 ) + 1 ; return { year , month , day } ; }
given a JDN and an era returns the Ethiopic equivalent

@param  {Number} jdn
@param  {Number} era
@return {Object} { year, month, day }
given a JDN and an era returns the Ethiopic equivalent