癸卯年腊月廿二思语

癸卯年腊月廿二思语
真语怕假意,实心玩虚情。
​口花昧心性,落地借泡影。
​乐言引好事,良药治未病。
​利欲藏曲直,实践证品行。

  • 7
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
可以使用第三方库LunarCalendar.js来实现,具体步骤如下: 1. 引入LunarCalendar.js库 ```html <script src="https://unpkg.com/lunar-calendar/dist/lunar-calendar.js"></script> ``` 2. 获取当前时间 ```javascript var now = new Date(); ``` 3. 转换为农历时间 ```javascript var lunar = calendar.solar2lunar(now.getFullYear(), now.getMonth() + 1, now.getDate()); ``` 4. 格式化输出 ```javascript var weekDays = ['日', '一', '二', '三', '四', '五', '六']; var yearName = calendar.toChinaYear(lunar.lYear); var monthName = calendar.toChinaMonth(lunar.lMonth); var dayName = calendar.toChinaDay(lunar.lDay); var result = now.getFullYear() + '' + (now.getMonth() + 1) + '月' + now.getDate() + '日 ' + '星期' + weekDays[now.getDay()] + ' 农历 ' + yearName + monthName + dayName; console.log(result); ``` 完整代码如下: ```javascript <script src="https://unpkg.com/lunar-calendar/dist/lunar-calendar.js"></script> <script> var now = new Date(); var lunar = calendar.solar2lunar(now.getFullYear(), now.getMonth() + 1, now.getDate()); var weekDays = ['日', '一', '二', '三', '四', '五', '六']; var yearName = calendar.toChinaYear(lunar.lYear); var monthName = calendar.toChinaMonth(lunar.lMonth); var dayName = calendar.toChinaDay(lunar.lDay); var result = now.getFullYear() + '' + (now.getMonth() + 1) + '月' + now.getDate() + '日 ' + '星期' + weekDays[now.getDay()] + ' 农历 ' + yearName + monthName + dayName; console.log(result); </script> ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一叶迎秋

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值