lunar-javascript icon indicating copy to clipboard operation
lunar-javascript copied to clipboard

日历、公历(阳历)、农历(阴历、老黄历)、佛历、道历,支持节假日、星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、...

Results 24 lunar-javascript issues
Sort by recently updated
recently updated
newest added

添加esm导出,@types文件支持

大佬,那个年历显示12个月调用哪个api啊,谢谢

看起来确实星宿有误,阴历1995-3-28,找了4个网站都是[胃宿(胃土雉)], ![1](https://github.com/6tail/lunar-javascript/assets/22077184/8987d2f5-d3d4-4f03-b7bb-6c0871e22368) ![2](https://github.com/6tail/lunar-javascript/assets/22077184/ab35bf21-731d-4444-81e3-331761a53792) ![3](https://github.com/6tail/lunar-javascript/assets/22077184/f20d9726-8670-471b-bd03-8dc18f8ad303) ![4](https://github.com/6tail/lunar-javascript/assets/22077184/8e676e6e-e8ba-4ecf-a9bf-06bad597c27a) 线上API返回的是西方奎木狼 ![5](https://github.com/6tail/lunar-javascript/assets/22077184/262cac99-c97f-4857-94b1-39133773f046)

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