Answers for "hijriyah year javascript"

0

hijriyah year javascript

function dynamicHijriyahYear() {
  let yearHijriyah = 1422;
  let initializeHijriyah = 1422;
  let yearsHijriyah = [yearHijriyah];

  let yearNow = new Date().getFullYear();

  for (let i = 0; i < 9999; i++) {
    initializeHijriyah = initializeHijriyah + 1;
    yearsHijriyah.push(initializeHijriyah);
  }

  const getIndexHijriyah = yearsHijriyah.indexOf(yearHijriyah);
  const getSubstractYearHijriyah = Math.abs(
    yearsHijriyah[getIndexHijriyah] - yearNow
  );
  const getYearHijriyah = Math.abs(getSubstractYearHijriyah - yearNow);
  return getYearHijriyah;
}
Posted by: Guest on May-13-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language