NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
### 获取数字表示 1. .getYear() > 获取道历年的数字 2. .getMonth() > 获取道历月的数字,值从1到12,但闰月为负数,如闰二月=-2。 3. .getDay() > 获取道历日的数字 ### 获取中文表示 1. .getYearInChinese() > 获取道历年的中文 2. .getMonthInChinese() > 获取道历月的中文 3. .getDayInChinese() > 获取道历日的中文 ### 示例代码 ``` const d = Tao.fromLunar(Lunar.fromDate(new Date())); console.log(d.getYear()); console.log(d.getMonth()); console.log(d.getDay()); console.log(d.getYearInChinese()); console.log(d.getMonthInChinese()); console.log(d.getDayInChinese()); ```