Open wideweide opened 9 months ago
import {SolarDay, JulianDay} from 'tyme4ts';
const solar = SolarDay.fromYmd(2024, 2, 29);// 支持 SolarDay.fromYmd('2024', '02', '29');
// 1986年5月29日 console.log(solar.toString());
// 农历丙寅年四月廿一 console.log(solar.getLunarDay().toString());
let term = solar.getTerm()
console.log(term.getName()) // 日历标注节气只标注第一天
let julianday = term.getJulianDay(); let solarDay = julianday.getSolarDay(); // 获取节气第一天 console.log(solarDay.toString()) ~
字符串参数不会支持的。节气第几天倒是来了。 equal(SolarDay.fromYmd(2023, 12, 7).getTermDay().toString(), '大雪第1天'); equal(SolarDay.fromYmd(2023, 12, 7).getTermDay().getDayIndex(), 0);
equal(SolarDay.fromYmd(2023, 12, 7).getTermDay().toString(), '大雪第1天');
equal(SolarDay.fromYmd(2023, 12, 7).getTermDay().getDayIndex(), 0);
import {SolarDay, JulianDay} from 'tyme4ts';
const solar = SolarDay.fromYmd(2024, 2, 29);// 支持 SolarDay.fromYmd('2024', '02', '29');
// 1986年5月29日 console.log(solar.toString());
// 农历丙寅年四月廿一 console.log(solar.getLunarDay().toString());
let term = solar.getTerm()
console.log(term.getName()) // 日历标注节气只标注第一天
let julianday = term.getJulianDay(); let solarDay = julianday.getSolarDay(); // 获取节气第一天 console.log(solarDay.toString()) ~