Skip to content
On this page

阴历 | LunarTime

引入方式

js
import { LunarTime } from 'divination-liurent';

实例化

js
const lunarTime = LunarTime(new Date())

获取年

js
console.log(lunarTime.year) // 年

返回结果

获取月

js
console.log(lunarTime.month) // 月

返回结果

获取日

js
console.log(lunarTime.day) // 日

返回结果

获取时辰

js
console.log(lunarTime.hour) // 时辰

返回结果

获取月将

js
console.log(lunarTime.monthGeneral) // 月将

返回结果

Released under the MIT License.