癸卯年腊月十二感思

癸卯年腊月十二感思
心有行止长,言无开关销。
​情是爱恨苦,乐非自私妙。
​学知渊源明,习得真实巧。
​内修容器伟,外改喜好俏。

  • 11
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
可以使用第三方库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> ```
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

一叶迎秋

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

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

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

打赏作者

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

抵扣说明:

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

余额充值