@rili/utils
v1.0.4
Published
> import { calendar, fixDate, JJRText, JQText, getJQByYear } from "@rili/utils";
Downloads
2
Readme
日历工具类方法
import { calendar, fixDate, JJRText, JQText, getJQByYear } from "@rili/utils";
公历年月日转农历数据 返回 json
calendar.solar2lunar(1987,11,01);
农历年月日转公历年月日
calendar.lunar2solar(1987,9,10);
//调用以上方法后返回类似如下 object(json)具体以上就不需要解释了吧!
//c 开头的是公历各属性值 l 开头的自然就是农历咯 gz 开头的就是天干地支纪年的数据啦~
{
Animal: "兔",
IDayCn: "初十",
IMonthCn: "九月",
Term: null,
astro: "天蝎座",
cDay: 1,
cMonth: 11,
cYear: 1987,
gzDay: "甲寅",
gzMonth: "庚戌",
gzYear: "丁卯",
isLeap: false,
isTerm: false,
isToday: false,
lDay: 10,
lMonth: 9,
lYear: 1987,
nWeek: 7,
ncWeek: "星期日"
}