f9yx0du 发表于 2024-10-8 16:13:30

一款支持星座、生肖、彭祖百忌、每日宜忌等超卷的日历工具库


    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-axegupay5k/df3f652017074c96b50177506b4b9693~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728305039&amp;x-signature=vssGIzBhnjcndXraNHpoT%2Fm91Wg%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><span style="color: black;">大众</span>好,我是凌览。</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><span style="color: black;">平常</span>GitHub划水<span style="color: black;">发掘</span>一款超级6的日历工具库lunar,它支持阳历、阴历、佛历和道历,<span style="color: black;">乃至</span>还玩上了星座、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋、凶煞宜忌、吉神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道日及吉凶等。大<span style="color: black;">都数</span>日历<span style="color: black;">需要</span><span style="color: black;">运用</span>它都能满足。</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">lunar还<span style="color: black;">供给</span>了多种<span style="color: black;">研发</span>语言支持,<span style="color: black;">包含</span>有:javascript、java、.net、php、python、go、typescript、flutter、swift。</span></span></p>
    <h1 style="color: black; text-align: left; margin-bottom: 10px;">示例</h1>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><span style="color: black;">咱们</span>来<span style="color: black;">瞧瞧</span>它给出的示例。</span></span></p><span style="color: black;"><span style="color: black;">年历</span></span>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/b97fb784d02a40d796a0f70ae27f3b3c~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728305039&amp;x-signature=q1fgQLCz3%2Fv0RmRN7H1V08F5Pbo%3D" style="width: 50%; margin-bottom: 20px;"></div><span style="color: black;"><span style="color: black;">仿百度搜索月历</span></span>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/9437772a63284e039dfab1f9fdd469d1~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728305039&amp;x-signature=%2BBmZ9hSldYZ8Vf%2B5HR5%2FWv2fQ88%3D" style="width: 50%; margin-bottom: 20px;"></div><span style="color: black;"><span style="color: black;">月历</span></span>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/cd921d994b734c29ace8b4abe663ebc9~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728305039&amp;x-signature=wwBlwri3EyK5DqNQBfknQJf2RXg%3D" style="width: 50%; margin-bottom: 20px;"></div><span style="color: black;"><span style="color: black;">农历月历</span></span>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/972eb9fc43604acd99df3fc7b650928f~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728305039&amp;x-signature=AF1psw1ASPVIxGG6%2BkIuEIvHK5M%3D" style="width: 50%; margin-bottom: 20px;"></div><span style="color: black;"><span style="color: black;">周历</span></span>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/2605979457864f78acb8047ab230c26d~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728305039&amp;x-signature=o2L%2FOsBLW6z7RZdJPdmJk9TKWxs%3D" style="width: 50%; margin-bottom: 20px;"></div><span style="color: black;"><span style="color: black;">老黄历</span></span>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/tos-cn-i-6w9my0ksvp/624c8dd8924e4c749ba062c79b9ca4a5~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1728305039&amp;x-signature=FY0GyYtF1elccldH7SbO3XC2jpw%3D" style="width: 50%; margin-bottom: 20px;"></div>
    <h1 style="color: black; text-align: left; margin-bottom: 10px;">快速上手</h1>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><span style="color: black;">这儿</span>演示lunar的javascript版。 安装:</span></span></p>npm install lunar-javascript
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><span style="color: black;">运用</span>:</span></span></p>const {Solar, Lunar, HolidayUtil} = require(lunar-javascript)
    console.log(Lunar.fromDate(new Date()).toFullString())
    console.log(Solar.fromYmd(2016, 1, 1).toFullString())
    console.log(HolidayUtil.getHoliday(2020, 5, 2) + )<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">lunar仅<span style="color: black;">供给</span>了API,并<span style="color: black;">无</span><span style="color: black;">供给</span>现成直接用的日历组件。 <span style="color: black;">例如</span>,阳历获取年月日、儒略日、星期、<span style="color: black;">是不是</span>闰年、节日、星座、日期推移、日期相减、日期比较、薪资比例、转阴历。</span></span></p>const {Solar} = require(lunar-javascript)

    //获取年、月、日
    var d = Solar.fromDate(new Date());
    console.log(d.getYear());
    console.log(d.getMonth());
    console.log(d.getDay());

    //儒略日
    var d = Solar.fromDate(new Date());
    console.log(d.getJulianDay());

    //获取星期
    var d = Solar.fromDate(new Date());
    console.log(d.getWeek());//数字
    console.log(d.getWeekInChinese());//中文

    //<span style="color: black;">是不是</span>闰年
    var d = Solar.fromDate(new Date());
    console.log(d.isLeapYear());

    //....<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;"><span style="color: black;">例如</span>,阴历获取年月日、获取时辰、获取星期、节日、干支、禄、生肖、节气、物候、数<span style="color: black;">9、</span>三伏、 二十八星宿、八卦方位、吉神方位等等。</span></span></p>const {Lunar} = require(lunar-javascript)

    //每日宜忌
    var d = Lunar.fromDate(new Date());
    // 宜var l = d.getDayYi();
    for (var i=0, j=l.length; i&lt;j; i++){
    console.log(l);
    }
    // 忌
    l = d.getDayJi();
    for (var i=0, j=l.length; i&lt;j; i++){
    console.log(l);
    }<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">阴历五花八门的,此处<span style="color: black;">再也不</span>列举<span style="color: black;">更加多</span>视<span style="color: black;">自己</span><span style="color: black;">需要</span><span style="color: black;">选取</span>。</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">工具文档<span style="color: black;">位置</span>:https://6tail.cn/calendar/api.html#solar.festivals.html</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">(完)</span></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">❝</span></strong></span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">关注公粽号【程序员凌览】回复"666",拉您进【人类高质量前端交流群~】</p>往期<span style="color: black;">举荐</span>:linglan01.cn/about
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">❞</p>




b1gc8v 发表于 2024-10-11 18:10:17

你的话语如春风拂面,让我感到无比温暖。

1fy07h 发表于 2024-11-2 23:49:07

这篇文章真的让我受益匪浅,外链发布感谢分享!

4lqedz 发表于 4 天前

i免费外链发布平台 http://www.fok120.com/

4lqedz 发表于 前天 21:45

外链论坛的成功举办,是与各位领导、同仁们的关怀和支持分不开的。在此,我谨代表公司向关心和支持论坛的各界人士表示最衷心的感谢!
页: [1]
查看完整版本: 一款支持星座、生肖、彭祖百忌、每日宜忌等超卷的日历工具库