lunar-javascript
lunar-javascript copied to clipboard
日历、公历(阳历)、农历(阴历、老黄历)、佛历、道历,支持节假日、星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、...
添加esm导出,@types文件支持
大佬,那个年历显示12个月调用哪个api啊,谢谢
看起来确实星宿有误,阴历1995-3-28,找了4个网站都是[胃宿(胃土雉)],     线上API返回的是西方奎木狼 
let s = Solar.fromYmd(2024, 2, 4); // 立春 let nx = s.getLunar().getNextJie(true); // ❌立春,✔惊蛰 let px = s.getLunar().getPrevJie(true); // ❌立春, ✔小寒 console.log(nx.getName(),px.getName()); 这三个居然全部都是立春?卡bug吗 [苦笑]
星宿错了, 对不上
如题。
如题,如果week小于start时结果错误,可参考: getWeeksOfMonth:function(year, month, start){ let week = Solar.fromYmd(year, month, 1).getWeek() week = week < start ? week + 7 : week return Math.ceil((this.getDaysOfMonth(year, month) + week - start)/7); }
比如gpts想调用以下日历转换、八字的api,应该怎么操作?
2024年的节假日已经发布,能不能同步更新一下?能不能像Dayjs一样分成主包和扩展包,节假日可以通过config.js或者config.json的方式自由扩展
类似这个: https://lunisolar.js.org/reference/gods/godBuilder/yearGods.html