lunar-calendar-date

| 参数 | 类型 | 是否必须 | 默认值 | 说明 | | - | - | - | - | - | | withYear | boolean | 否 | false | 是否显示农历年 |

Usage no npm install needed!

<script type="module">
  import lunarCalendarDate from 'https://cdn.skypack.dev/lunar-calendar-date';
</script>

README

参数说明

| 参数 | 类型 | 是否必须 | 默认值 | 说明 | | - | - | - | - | - | | withYear | boolean | 否 | false | 是否显示农历年 |

示例用法

import { lunarCalendarDate } from 'lunar-calendar-date'

const lunarDate = lunarCalendarDate()
const lunarDateWithYear = lunarCalendarDate(true)

console.log(lunarDate) // 七月廿九
console.log(lunarDateWithYear) // 庚子(鼠)年七月廿九