import { LunarHour, LunarSect2EightCharProvider } from 'tyme4ts'; LunarHour.provider = new LunarSect2EightCharProvider(); const lunar = LunarHour.fromYmdHms(1994, 10, 5, 18, 0, 0); const bazi = lunar.getEightChar(); console.log(bazi.toString()); // const count: Record = {}; // for (let year = 1900; year < 2200; year++) { // const y = SixtyCycleYear.fromYear(year); // const months = y.getMonths(); // for (const m of months) { // const days = m.getDays(); // for (const d of days) { // const hours = d.getHours(); // for (const h of hours) { // const key = // y.getSixtyCycle().getName() + m.getSixtyCycle().getName() + d.getSixtyCycle().getName() + h.getSixtyCycle().getName(); // count[key] = (count[key] || 0) + 1; // } // } // } // console.log(`Done for ${year}.`); // } // writeFileSync('bazi.txt', JSON.stringify(count, undefined, 2)); // console.log('Done!');