Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce267b4942 | ||
|
|
6581f01956 |
@@ -189,3 +189,12 @@ test('流月', () => {
|
|||||||
const yun = eightChar.getYun(1);
|
const yun = eightChar.getYun(1);
|
||||||
expect(yun.getDaYun()[0].getLiuNian()[0].getLiuYue()[0].getGanZhi()).toBe('甲寅');
|
expect(yun.getDaYun()[0].getLiuNian()[0].getLiuYue()[0].getGanZhi()).toBe('甲寅');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('test19', () => {
|
||||||
|
const solarList = Solar.fromBaZi('丁丑','癸卯','癸丑','辛酉', 2, 1900);
|
||||||
|
const timeList = [];
|
||||||
|
solarList.forEach(solar => {
|
||||||
|
timeList.push(solar.toYmdHms());
|
||||||
|
})
|
||||||
|
expect(timeList).toStrictEqual(['1997-03-12 18:00:00', '1937-03-27 18:00:00']);
|
||||||
|
});
|
||||||
|
|||||||
@@ -655,3 +655,11 @@ test('test071', () => {
|
|||||||
const solar = Solar.fromYmd(918, 1, 1);
|
const solar = Solar.fromYmd(918, 1, 1);
|
||||||
expect(solar.getLunar().toString()).toBe('九一七年冬月十六');
|
expect(solar.getLunar().toString()).toBe('九一七年冬月十六');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('test072', () => {
|
||||||
|
const solar = Solar.fromYmd(1991, 2, 15);
|
||||||
|
const lunar = solar.getLunar();
|
||||||
|
expect(lunar.toString()).toBe('一九九一年正月初一');
|
||||||
|
expect(lunar.getYearInGanZhi()).toBe('辛未');
|
||||||
|
expect(lunar.getYearShengXiao()).toBe('羊');
|
||||||
|
});
|
||||||
|
|||||||
@@ -65,3 +65,13 @@ test('test9', () => {
|
|||||||
test('test10', () => {
|
test('test10', () => {
|
||||||
expect(Solar.fromYmd(9865, 7, 26).getWeek()).toBe(3);
|
expect(Solar.fromYmd(9865, 7, 26).getWeek()).toBe(3);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('test11', () => {
|
||||||
|
expect(Solar.fromYmd(1961, 9, 30).getWeek()).toBe(6);
|
||||||
|
expect(Solar.fromYmdHms(1961, 9, 30, 23, 59, 59).getWeek()).toBe(6);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('test12', () => {
|
||||||
|
expect(Solar.fromYmdHms(2021, 9, 15, 0, 0, 0).getWeek()).toBe(3);
|
||||||
|
expect(Solar.fromYmdHms(2021, 9, 15, 23, 59, 59).getWeek()).toBe(3);
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lunar-javascript",
|
"name": "lunar-javascript",
|
||||||
"version": "1.6.6",
|
"version": "1.6.8",
|
||||||
"description": "lunar is a calendar library for Solar and Chinese Lunar.",
|
"description": "lunar is a calendar library for Solar and Chinese Lunar.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user