From e6954260899c7999ce0066e9f0ff7c01d4549915 Mon Sep 17 00:00:00 2001 From: hao li Date: Wed, 29 Aug 2018 13:28:36 +0800 Subject: [PATCH 1/3] fix array index out range problem of ganZhiYear --- src/Calendar.php | 34 +++++++++++++--------------------- tests/CalendarTest.php | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/src/Calendar.php b/src/Calendar.php index 6ffa10d..c358013 100644 --- a/src/Calendar.php +++ b/src/Calendar.php @@ -356,27 +356,19 @@ public function solarDays($year, $month) */ public function ganZhiYear($lunarYear, $termIndex = null) { - $ganKey = ($lunarYear - 3) % 10; - $zhiKey = ($lunarYear - 3) % 12; - - // 如果余数为 0 则为最后一个天干 - if (0 === $ganKey) { - $ganKey = 10; - } - - // 如果余数为 0 则为最后一个地支 - if (0 === $zhiKey) { - $zhiKey = 12; - } - - if (null !== $termIndex) { - if (3 > $termIndex) { - $ganKey += 1; - $zhiKey += 1; - } - } - - return $this->gan[$ganKey - 1].$this->zhi[$zhiKey - 1]; + /** + * 据维基百科干支词条:『在西历新年后,华夏新年或干支历新年之前,则续用上一年之干支』 + * 所以干支年份应该不需要根据节气校正,未免影响现有系统,此处暂时保留原有逻辑 + * https://zh.wikipedia.org/wiki/%E5%B9%B2%E6%94%AF + * + * 即使考虑节气,有的年份没有立春,有的年份有两个立春,此处逻辑仍不能处理该特殊情况 + */ + $adjust = null !== $termIndex && 3 > $termIndex ? 1 : 0; + + $ganKey = ($lunarYear + $adjust - 4) % 10; + $zhiKey = ($lunarYear + $adjust - 4) % 12; + + return $this->gan[$ganKey].$this->zhi[$zhiKey]; } /** diff --git a/tests/CalendarTest.php b/tests/CalendarTest.php index abcd08b..3273940 100644 --- a/tests/CalendarTest.php +++ b/tests/CalendarTest.php @@ -12,6 +12,25 @@ class CalendarTest extends TestCase { + + #region ganZhiYear + + public function testJiaZiGanZhiYear() + { + $calendar = new Calendar(); + $ganZhi = $calendar->ganZhiYear(1984); + $this->assertEquals('甲子', $ganZhi); + } + + public function testKuiHaiGanZhiYear() + { + $calendar = new Calendar(); + $ganZhi = $calendar->ganZhiYear(1983); + $this->assertEquals('癸亥', $ganZhi); + } + + #endregion ganZhiYear + #region diffInYears public function testSameNormalDateDiffInYears() From 70ad009828b5ecb8399e28cfbb80bbb66d5d980e Mon Sep 17 00:00:00 2001 From: hao li Date: Wed, 29 Aug 2018 14:11:24 +0800 Subject: [PATCH 2/3] change default parameter value of diffInYears diffInMonths and diffInDays --- src/Calendar.php | 8 +- tests/CalendarTest.php | 2320 ++++++++++++++++++++-------------------- 2 files changed, 1164 insertions(+), 1164 deletions(-) diff --git a/src/Calendar.php b/src/Calendar.php index c358013..daba544 100644 --- a/src/Calendar.php +++ b/src/Calendar.php @@ -358,7 +358,7 @@ public function ganZhiYear($lunarYear, $termIndex = null) { /** * 据维基百科干支词条:『在西历新年后,华夏新年或干支历新年之前,则续用上一年之干支』 - * 所以干支年份应该不需要根据节气校正,未免影响现有系统,此处暂时保留原有逻辑 + * 所以干支年份应该不需要根据节气校正,为免影响现有系统,此处暂时保留原有逻辑 * https://zh.wikipedia.org/wiki/%E5%B9%B2%E6%94%AF * * 即使考虑节气,有的年份没有立春,有的年份有两个立春,此处逻辑仍不能处理该特殊情况 @@ -806,7 +806,7 @@ public function dateDiff($date1, $date2) * @param bool $absolute * @return int */ - public function diffInYears($lunar1, $lunar2, $absolute = false) + public function diffInYears($lunar1, $lunar2, $absolute = true) { $solar1 = $this->lunar2solar($lunar1['lunar_year'], $lunar1['lunar_month'], $lunar1['lunar_day'], $lunar1['is_leap']); $date1 = $this->makeDate("{$solar1['solar_year']}-{$solar1['solar_month']}-{$solar1['solar_day']}"); @@ -844,7 +844,7 @@ public function diffInYears($lunar1, $lunar2, $absolute = false) * @param bool $absolute * @return int */ - public function diffInMonths($lunar1, $lunar2, $absolute = false) + public function diffInMonths($lunar1, $lunar2, $absolute = true) { $solar1 = $this->lunar2solar($lunar1['lunar_year'], $lunar1['lunar_month'], $lunar1['lunar_day'], $lunar1['is_leap']); $date1 = $this->makeDate("{$solar1['solar_year']}-{$solar1['solar_month']}-{$solar1['solar_day']}"); @@ -895,7 +895,7 @@ public function diffInMonths($lunar1, $lunar2, $absolute = false) * @param bool $absolute * @return int */ - public function diffInDays($lunar1, $lunar2, $absolute = false) + public function diffInDays($lunar1, $lunar2, $absolute = true) { $solar1 = $this->lunar2solar($lunar1['lunar_year'], $lunar1['lunar_month'], $lunar1['lunar_day'], $lunar1['is_leap']); $date1 = $this->makeDate("{$solar1['solar_year']}-{$solar1['solar_month']}-{$solar1['solar_day']}"); diff --git a/tests/CalendarTest.php b/tests/CalendarTest.php index 3273940..9708ddd 100644 --- a/tests/CalendarTest.php +++ b/tests/CalendarTest.php @@ -38,8 +38,8 @@ public function testSameNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 29, false); $lunar2 = $calendar->lunar(2017, 6, 29, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff2); } @@ -49,8 +49,8 @@ public function testSameLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 30, true); $lunar2 = $calendar->lunar(2017, 6, 30, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff2); } @@ -62,9 +62,9 @@ public function testLessMonthLessDayNormalDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 8, 20, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -76,9 +76,9 @@ public function testLessMonthLessDayNormalDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2007, 5, 10, false); $lunar2 = $calendar->lunar(2017, 6, 20, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -89,9 +89,9 @@ public function testLessMonthLessDayLeapDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2027, 7, 20, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -102,9 +102,9 @@ public function testLessMonthLessDayLeapDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2052, 8, 20, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(35, $diff1); $this->assertEquals(-35, $diff2); $this->assertEquals(35, $diff2a); @@ -115,9 +115,9 @@ public function testLessMonthEqualDayNormalDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 8, 10, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -129,9 +129,9 @@ public function testLessMonthEqualDayNormalDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2007, 5, 10, false); $lunar2 = $calendar->lunar(2017, 6, 10, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -142,9 +142,9 @@ public function testLessMonthEqualDayLeapDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2027, 7, 10, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -155,9 +155,9 @@ public function testLessMonthEqualDayLeapDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2052, 8, 10, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(35, $diff1); $this->assertEquals(-35, $diff2); $this->assertEquals(35, $diff2a); @@ -168,9 +168,9 @@ public function testLessMonthGreaterDayNormalDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 8, 1, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -182,9 +182,9 @@ public function testLessMonthGreaterDayNormalDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2007, 5, 10, false); $lunar2 = $calendar->lunar(2017, 6, 1, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -195,9 +195,9 @@ public function testLessMonthGreaterDayLeapDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2027, 7, 1, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -208,9 +208,9 @@ public function testLessMonthGreaterDayLeapDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2052, 8, 1, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(35, $diff1); $this->assertEquals(-35, $diff2); $this->assertEquals(35, $diff2a); @@ -225,9 +225,9 @@ public function testEqualMonthLessDayNormalDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 6, 20, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -239,9 +239,9 @@ public function testEqualMonthLessDayNormalDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2007, 6, 10, false); $lunar2 = $calendar->lunar(2017, 6, 20, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -252,9 +252,9 @@ public function testEqualMonthLessDayLeapDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2027, 6, 20, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -265,9 +265,9 @@ public function testEqualMonthLessDayLeapDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(8, $diff1); $this->assertEquals(-8, $diff2); $this->assertEquals(8, $diff2a); @@ -279,9 +279,9 @@ public function testEqualMonthEqualDayNormalDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 6, 10, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -293,9 +293,9 @@ public function testEqualMonthEqualDayNormalDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2007, 6, 10, false); $lunar2 = $calendar->lunar(2017, 6, 10, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -306,9 +306,9 @@ public function testEqualMonthEqualDayLeapDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2027, 6, 10, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -319,9 +319,9 @@ public function testEqualMonthEqualDayLeapDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(8, $diff1); $this->assertEquals(-8, $diff2); $this->assertEquals(8, $diff2a); @@ -333,9 +333,9 @@ public function testEqualMonthGreaterDayNormalDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 6, 1, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -347,9 +347,9 @@ public function testEqualMonthGreaterDayNormalDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2007, 6, 10, false); $lunar2 = $calendar->lunar(2017, 6, 1, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(10, $diff1); $this->assertEquals(-10, $diff2); $this->assertEquals(10, $diff2a); @@ -360,9 +360,9 @@ public function testEqualMonthGreaterDayLeapDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2027, 6, 1, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -373,9 +373,9 @@ public function testEqualMonthGreaterDayLeapDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2025, 6, 1, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(7, $diff1); $this->assertEquals(-7, $diff2); $this->assertEquals(7, $diff2a); @@ -390,9 +390,9 @@ public function testGreaterMonthLessDayNormalDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 5, 20, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -404,9 +404,9 @@ public function testGreaterMonthLessDayNormalDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 5, 20, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -417,9 +417,9 @@ public function testGreaterMonthLessDayLeapDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2027, 5, 20, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -430,9 +430,9 @@ public function testGreaterMonthLessDayLeapDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2020, 4, 20, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(2, $diff1); $this->assertEquals(-2, $diff2); $this->assertEquals(2, $diff2a); @@ -444,9 +444,9 @@ public function testGreaterMonthEqualDayNormalDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 5, 10, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -458,9 +458,9 @@ public function testGreaterMonthEqualDayNormalDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 5, 10, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -471,9 +471,9 @@ public function testGreaterMonthEqualDayLeapDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2027, 5, 10, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -484,9 +484,9 @@ public function testGreaterMonthEqualDayLeapDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2020, 4, 10, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(2, $diff1); $this->assertEquals(-2, $diff2); $this->assertEquals(2, $diff2a); @@ -498,9 +498,9 @@ public function testGreaterMonthGreaterDayNormalDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 5, 1, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -512,9 +512,9 @@ public function testGreaterMonthGreaterDayNormalDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2027, 5, 1, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -525,9 +525,9 @@ public function testGreaterMonthGreaterDayLeapDateAndNormalDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2027, 5, 1, false); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(9, $diff1); $this->assertEquals(-9, $diff2); $this->assertEquals(9, $diff2a); @@ -538,9 +538,9 @@ public function testGreaterMonthGreaterDayLeapDateAndLeapDateDiffInYears() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2020, 4, 1, true); - $diff1 = $calendar->diffInYears($lunar1, $lunar2); - $diff2 = $calendar->diffInYears($lunar2, $lunar1); - $diff2a = $calendar->diffInYears($lunar2, $lunar1, true); + $diff1 = $calendar->diffInYears($lunar1, $lunar2, false); + $diff2 = $calendar->diffInYears($lunar2, $lunar1, false); + $diff2a = $calendar->diffInYears($lunar2, $lunar1); $this->assertEquals(2, $diff1); $this->assertEquals(-2, $diff2); $this->assertEquals(2, $diff2a); @@ -559,10 +559,10 @@ public function testDifferentYearLessMonthLessDayNormalYearNormalDateAndNormalYe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2026, 8, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(105, $diff1); $this->assertEquals(105, $diff1a); $this->assertEquals(-105, $diff2); @@ -574,10 +574,10 @@ public function testDifferentYearLessMonthLessDayNormalYearNormalDateAndLeapYear $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(89, $diff1); $this->assertEquals(89, $diff1a); $this->assertEquals(-89, $diff2); @@ -589,10 +589,10 @@ public function testDifferentYearLessMonthLessDayNormalYearNormalDateAndLeapYear $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(90, $diff1); $this->assertEquals(90, $diff1a); $this->assertEquals(-90, $diff2); @@ -604,10 +604,10 @@ public function testDifferentYearLessMonthLessDayNormalYearNormalDateAndLeapYear $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 7, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(92, $diff1); $this->assertEquals(92, $diff1a); $this->assertEquals(-92, $diff2); @@ -619,10 +619,10 @@ public function testDifferentYearLessMonthLessDayNormalYearNormalDateAndLeapDate $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(91, $diff1); $this->assertEquals(91, $diff1a); $this->assertEquals(-91, $diff2); @@ -634,10 +634,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateLessThanLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2026, 8, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(81, $diff1); $this->assertEquals(81, $diff1a); $this->assertEquals(-81, $diff2); @@ -649,10 +649,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateLessThanLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(65, $diff1); $this->assertEquals(65, $diff1a); $this->assertEquals(-65, $diff2); @@ -664,10 +664,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateLessThanLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(66, $diff1); $this->assertEquals(66, $diff1a); $this->assertEquals(-66, $diff2); @@ -679,10 +679,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateLessThanLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 7, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(68, $diff1); $this->assertEquals(68, $diff1a); $this->assertEquals(-68, $diff2); @@ -694,10 +694,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateLessThanLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(67, $diff1); $this->assertEquals(67, $diff1a); $this->assertEquals(-67, $diff2); @@ -709,10 +709,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateEqualLeapMont $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2026, 8, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(79, $diff1); $this->assertEquals(79, $diff1a); $this->assertEquals(-79, $diff2); @@ -724,10 +724,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateEqualLeapMont $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(63, $diff1); $this->assertEquals(63, $diff1a); $this->assertEquals(-63, $diff2); @@ -739,10 +739,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateEqualLeapMont $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(64, $diff1); $this->assertEquals(64, $diff1a); $this->assertEquals(-64, $diff2); @@ -754,10 +754,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateEqualLeapMont $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 7, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(66, $diff1); $this->assertEquals(66, $diff1a); $this->assertEquals(-66, $diff2); @@ -769,10 +769,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateEqualLeapMont $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(65, $diff1); $this->assertEquals(65, $diff1a); $this->assertEquals(-65, $diff2); @@ -784,10 +784,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateGreaterThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2026, 8, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(77, $diff1); $this->assertEquals(77, $diff1a); $this->assertEquals(-77, $diff2); @@ -799,10 +799,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateGreaterThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(61, $diff1); $this->assertEquals(61, $diff1a); $this->assertEquals(-61, $diff2); @@ -814,10 +814,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateGreaterThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(62, $diff1); $this->assertEquals(62, $diff1a); $this->assertEquals(-62, $diff2); @@ -829,10 +829,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateGreaterThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 7, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(64, $diff1); $this->assertEquals(64, $diff1a); $this->assertEquals(-64, $diff2); @@ -844,10 +844,10 @@ public function testDifferentYearLessMonthLessDayLeapYearNormalDateGreaterThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(63, $diff1); $this->assertEquals(63, $diff1a); $this->assertEquals(-63, $diff2); @@ -859,10 +859,10 @@ public function testDifferentYearLessMonthLessDayLeapDateAndNormalYearNormalDate $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2026, 8, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(78, $diff1); $this->assertEquals(78, $diff1a); $this->assertEquals(-78, $diff2); @@ -874,10 +874,10 @@ public function testDifferentYearLessMonthLessDayLeapDateAndLeapYearNormalDateLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(62, $diff1); $this->assertEquals(62, $diff1a); $this->assertEquals(-62, $diff2); @@ -889,10 +889,10 @@ public function testDifferentYearLessMonthLessDayLeapDateAndLeapYearNormalDateEq $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(63, $diff1); $this->assertEquals(63, $diff1a); $this->assertEquals(-63, $diff2); @@ -904,10 +904,10 @@ public function testDifferentYearLessMonthLessDayLeapDateAndLeapYearNormalDateGr $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 7, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(65, $diff1); $this->assertEquals(65, $diff1a); $this->assertEquals(-65, $diff2); @@ -919,10 +919,10 @@ public function testDifferentYearLessMonthLessDayLeapDateAndLeapDateDiffInMonths $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(64, $diff1); $this->assertEquals(64, $diff1a); $this->assertEquals(-64, $diff2); @@ -938,10 +938,10 @@ public function testDifferentYearLessMonthEqualDayNormalYearNormalDateAndNormalY $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2026, 8, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(105, $diff1); $this->assertEquals(105, $diff1a); $this->assertEquals(-105, $diff2); @@ -953,10 +953,10 @@ public function testDifferentYearLessMonthEqualDayNormalYearNormalDateAndLeapYea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(89, $diff1); $this->assertEquals(89, $diff1a); $this->assertEquals(-89, $diff2); @@ -968,10 +968,10 @@ public function testDifferentYearLessMonthEqualDayNormalYearNormalDateAndLeapYea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(90, $diff1); $this->assertEquals(90, $diff1a); $this->assertEquals(-90, $diff2); @@ -983,10 +983,10 @@ public function testDifferentYearLessMonthEqualDayNormalYearNormalDateAndLeapYea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 7, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(92, $diff1); $this->assertEquals(92, $diff1a); $this->assertEquals(-92, $diff2); @@ -998,10 +998,10 @@ public function testDifferentYearLessMonthEqualDayNormalYearNormalDateAndLeapDat $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(91, $diff1); $this->assertEquals(91, $diff1a); $this->assertEquals(-91, $diff2); @@ -1013,10 +1013,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateLessThanLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2026, 8, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(81, $diff1); $this->assertEquals(81, $diff1a); $this->assertEquals(-81, $diff2); @@ -1028,10 +1028,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateLessThanLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(65, $diff1); $this->assertEquals(65, $diff1a); $this->assertEquals(-65, $diff2); @@ -1043,10 +1043,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateLessThanLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(66, $diff1); $this->assertEquals(66, $diff1a); $this->assertEquals(-66, $diff2); @@ -1058,10 +1058,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateLessThanLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 7, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(68, $diff1); $this->assertEquals(68, $diff1a); $this->assertEquals(-68, $diff2); @@ -1073,10 +1073,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateLessThanLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(67, $diff1); $this->assertEquals(67, $diff1a); $this->assertEquals(-67, $diff2); @@ -1088,10 +1088,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateEqualLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2026, 8, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(79, $diff1); $this->assertEquals(79, $diff1a); $this->assertEquals(-79, $diff2); @@ -1103,10 +1103,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateEqualLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(63, $diff1); $this->assertEquals(63, $diff1a); $this->assertEquals(-63, $diff2); @@ -1118,10 +1118,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateEqualLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(64, $diff1); $this->assertEquals(64, $diff1a); $this->assertEquals(-64, $diff2); @@ -1133,10 +1133,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateEqualLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 7, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(66, $diff1); $this->assertEquals(66, $diff1a); $this->assertEquals(-66, $diff2); @@ -1148,10 +1148,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateEqualLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(65, $diff1); $this->assertEquals(65, $diff1a); $this->assertEquals(-65, $diff2); @@ -1163,10 +1163,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateGreaterThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2026, 8, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(77, $diff1); $this->assertEquals(77, $diff1a); $this->assertEquals(-77, $diff2); @@ -1178,10 +1178,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateGreaterThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(61, $diff1); $this->assertEquals(61, $diff1a); $this->assertEquals(-61, $diff2); @@ -1193,10 +1193,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateGreaterThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(62, $diff1); $this->assertEquals(62, $diff1a); $this->assertEquals(-62, $diff2); @@ -1208,10 +1208,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateGreaterThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 7, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(64, $diff1); $this->assertEquals(64, $diff1a); $this->assertEquals(-64, $diff2); @@ -1223,10 +1223,10 @@ public function testDifferentYearLessMonthEqualDayLeapYearNormalDateGreaterThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(63, $diff1); $this->assertEquals(63, $diff1a); $this->assertEquals(-63, $diff2); @@ -1238,10 +1238,10 @@ public function testDifferentYearLessMonthEqualDayLeapDateAndNormalYearNormalDat $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2026, 8, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(78, $diff1); $this->assertEquals(78, $diff1a); $this->assertEquals(-78, $diff2); @@ -1253,10 +1253,10 @@ public function testDifferentYearLessMonthEqualDayLeapDateAndLeapYearNormalDateL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(62, $diff1); $this->assertEquals(62, $diff1a); $this->assertEquals(-62, $diff2); @@ -1268,10 +1268,10 @@ public function testDifferentYearLessMonthEqualDayLeapDateAndLeapYearNormalDateE $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(63, $diff1); $this->assertEquals(63, $diff1a); $this->assertEquals(-63, $diff2); @@ -1283,10 +1283,10 @@ public function testDifferentYearLessMonthEqualDayLeapDateAndLeapYearNormalDateG $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 7, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(65, $diff1); $this->assertEquals(65, $diff1a); $this->assertEquals(-65, $diff2); @@ -1298,10 +1298,10 @@ public function testDifferentYearLessMonthEqualDayLeapDateAndLeapDateDiffInMonth $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(64, $diff1); $this->assertEquals(64, $diff1a); $this->assertEquals(-64, $diff2); @@ -1317,10 +1317,10 @@ public function testDifferentYearLessMonthGreaterDayNormalYearNormalDateAndNorma $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2026, 8, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(104, $diff1); $this->assertEquals(104, $diff1a); $this->assertEquals(-104, $diff2); @@ -1332,10 +1332,10 @@ public function testDifferentYearLessMonthGreaterDayNormalYearNormalDateAndLeapY $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(88, $diff1); $this->assertEquals(88, $diff1a); $this->assertEquals(-88, $diff2); @@ -1347,10 +1347,10 @@ public function testDifferentYearLessMonthGreaterDayNormalYearNormalDateAndLeapY $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(89, $diff1); $this->assertEquals(89, $diff1a); $this->assertEquals(-89, $diff2); @@ -1362,10 +1362,10 @@ public function testDifferentYearLessMonthGreaterDayNormalYearNormalDateAndLeapY $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 7, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(91, $diff1); $this->assertEquals(91, $diff1a); $this->assertEquals(-91, $diff2); @@ -1377,10 +1377,10 @@ public function testDifferentYearLessMonthGreaterDayNormalYearNormalDateAndLeapD $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(90, $diff1); $this->assertEquals(90, $diff1a); $this->assertEquals(-90, $diff2); @@ -1392,10 +1392,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateLessThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2026, 8, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(80, $diff1); $this->assertEquals(80, $diff1a); $this->assertEquals(-80, $diff2); @@ -1407,10 +1407,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateLessThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(64, $diff1); $this->assertEquals(64, $diff1a); $this->assertEquals(-64, $diff2); @@ -1422,10 +1422,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateLessThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(65, $diff1); $this->assertEquals(65, $diff1a); $this->assertEquals(-65, $diff2); @@ -1437,10 +1437,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateLessThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 7, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(67, $diff1); $this->assertEquals(67, $diff1a); $this->assertEquals(-67, $diff2); @@ -1452,10 +1452,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateLessThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(66, $diff1); $this->assertEquals(66, $diff1a); $this->assertEquals(-66, $diff2); @@ -1467,10 +1467,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateEqualLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2026, 8, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(78, $diff1); $this->assertEquals(78, $diff1a); $this->assertEquals(-78, $diff2); @@ -1482,10 +1482,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateEqualLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(62, $diff1); $this->assertEquals(62, $diff1a); $this->assertEquals(-62, $diff2); @@ -1497,10 +1497,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateEqualLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(63, $diff1); $this->assertEquals(63, $diff1a); $this->assertEquals(-63, $diff2); @@ -1512,10 +1512,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateEqualLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 7, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(65, $diff1); $this->assertEquals(65, $diff1a); $this->assertEquals(-65, $diff2); @@ -1527,10 +1527,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateEqualLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(64, $diff1); $this->assertEquals(64, $diff1a); $this->assertEquals(-64, $diff2); @@ -1542,10 +1542,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateGreaterTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2026, 8, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(76, $diff1); $this->assertEquals(76, $diff1a); $this->assertEquals(-76, $diff2); @@ -1557,10 +1557,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateGreaterTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(60, $diff1); $this->assertEquals(60, $diff1a); $this->assertEquals(-60, $diff2); @@ -1572,10 +1572,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateGreaterTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(61, $diff1); $this->assertEquals(61, $diff1a); $this->assertEquals(-61, $diff2); @@ -1587,10 +1587,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateGreaterTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 7, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(63, $diff1); $this->assertEquals(63, $diff1a); $this->assertEquals(-63, $diff2); @@ -1602,10 +1602,10 @@ public function testDifferentYearLessMonthGreaterDayLeapYearNormalDateGreaterTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(62, $diff1); $this->assertEquals(62, $diff1a); $this->assertEquals(-62, $diff2); @@ -1617,10 +1617,10 @@ public function testDifferentYearLessMonthGreaterDayLeapDateAndNormalYearNormalD $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2026, 8, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(77, $diff1); $this->assertEquals(77, $diff1a); $this->assertEquals(-77, $diff2); @@ -1632,10 +1632,10 @@ public function testDifferentYearLessMonthGreaterDayLeapDateAndLeapYearNormalDat $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(61, $diff1); $this->assertEquals(61, $diff1a); $this->assertEquals(-61, $diff2); @@ -1647,10 +1647,10 @@ public function testDifferentYearLessMonthGreaterDayLeapDateAndLeapYearNormalDat $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 6, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(62, $diff1); $this->assertEquals(62, $diff1a); $this->assertEquals(-62, $diff2); @@ -1662,10 +1662,10 @@ public function testDifferentYearLessMonthGreaterDayLeapDateAndLeapYearNormalDat $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 7, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(64, $diff1); $this->assertEquals(64, $diff1a); $this->assertEquals(-64, $diff2); @@ -1677,10 +1677,10 @@ public function testDifferentYearLessMonthGreaterDayLeapDateAndLeapDateDiffInMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 4, 10, true); $lunar2 = $calendar->lunar(2025, 6, 9, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(63, $diff1); $this->assertEquals(63, $diff1a); $this->assertEquals(-63, $diff2); @@ -1696,10 +1696,10 @@ public function testDifferentYearEqualMonthLessDayNormalYearNormalDateAndNormalY $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2026, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(99, $diff1); $this->assertEquals(99, $diff1a); $this->assertEquals(-99, $diff2); @@ -1711,10 +1711,10 @@ public function testDifferentYearEqualMonthLessDayNormalYearNormalDateAndLeapYea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(86, $diff1); $this->assertEquals(86, $diff1a); $this->assertEquals(-86, $diff2); @@ -1726,10 +1726,10 @@ public function testDifferentYearEqualMonthLessDayNormalYearNormalDateAndLeapYea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(86, $diff1); $this->assertEquals(86, $diff1a); $this->assertEquals(-86, $diff2); @@ -1741,10 +1741,10 @@ public function testDifferentYearEqualMonthLessDayNormalYearNormalDateAndLeapYea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 7, 10, false); $lunar2 = $calendar->lunar(2025, 7, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(87, $diff1); $this->assertEquals(87, $diff1a); $this->assertEquals(-87, $diff2); @@ -1756,10 +1756,10 @@ public function testDifferentYearEqualMonthLessDayNormalYearNormalDateAndLeapDat $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(87, $diff1); $this->assertEquals(87, $diff1a); $this->assertEquals(-87, $diff2); @@ -1771,10 +1771,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateLessThanLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2026, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(75, $diff1); $this->assertEquals(75, $diff1a); $this->assertEquals(-75, $diff2); @@ -1786,10 +1786,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateLessThanLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(62, $diff1); $this->assertEquals(62, $diff1a); $this->assertEquals(-62, $diff2); @@ -1801,10 +1801,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateLessThanLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(136, $diff1); $this->assertEquals(136, $diff1a); $this->assertEquals(-136, $diff2); @@ -1816,10 +1816,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateLessThanLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(75, $diff1); $this->assertEquals(75, $diff1a); $this->assertEquals(-75, $diff2); @@ -1831,10 +1831,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateLessThanLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(137, $diff1); $this->assertEquals(137, $diff1a); $this->assertEquals(-137, $diff2); @@ -1846,10 +1846,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateEqualLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2026, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(112, $diff1); $this->assertEquals(112, $diff1a); $this->assertEquals(-112, $diff2); @@ -1861,10 +1861,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateEqualLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2033, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(198, $diff1); $this->assertEquals(198, $diff1a); $this->assertEquals(-198, $diff2); @@ -1876,10 +1876,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateEqualLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(99, $diff1); $this->assertEquals(99, $diff1a); $this->assertEquals(-99, $diff2); @@ -1891,10 +1891,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateEqualLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2028, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(137, $diff1); $this->assertEquals(137, $diff1a); $this->assertEquals(-137, $diff2); @@ -1906,10 +1906,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateEqualLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(100, $diff1); $this->assertEquals(100, $diff1a); $this->assertEquals(-100, $diff2); @@ -1921,10 +1921,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateGreaterThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2026, 4, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(73, $diff1); $this->assertEquals(73, $diff1a); $this->assertEquals(-73, $diff2); @@ -1936,10 +1936,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateGreaterThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2033, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(160, $diff1); $this->assertEquals(160, $diff1a); $this->assertEquals(-160, $diff2); @@ -1951,10 +1951,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateGreaterThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(98, $diff1); $this->assertEquals(98, $diff1a); $this->assertEquals(-98, $diff2); @@ -1966,10 +1966,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateGreaterThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2031, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(136, $diff1); $this->assertEquals(136, $diff1a); $this->assertEquals(-136, $diff2); @@ -1981,10 +1981,10 @@ public function testDifferentYearEqualMonthLessDayLeapYearNormalDateGreaterThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(99, $diff1); $this->assertEquals(99, $diff1a); $this->assertEquals(-99, $diff2); @@ -1996,10 +1996,10 @@ public function testDifferentYearEqualMonthLessDayLeapDateAndNormalYearNormalDat $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2026, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(111, $diff1); $this->assertEquals(111, $diff1a); $this->assertEquals(-111, $diff2); @@ -2011,10 +2011,10 @@ public function testDifferentYearEqualMonthLessDayLeapDateAndLeapYearNormalDateL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2033, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(197, $diff1); $this->assertEquals(197, $diff1a); $this->assertEquals(-197, $diff2); @@ -2026,10 +2026,10 @@ public function testDifferentYearEqualMonthLessDayLeapDateAndLeapYearNormalDateE $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2025, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(98, $diff1); $this->assertEquals(98, $diff1a); $this->assertEquals(-98, $diff2); @@ -2041,10 +2041,10 @@ public function testDifferentYearEqualMonthLessDayLeapDateAndLeapYearNormalDateG $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2028, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(136, $diff1); $this->assertEquals(136, $diff1a); $this->assertEquals(-136, $diff2); @@ -2056,10 +2056,10 @@ public function testDifferentYearEqualMonthLessDayLeapDateAndLeapDateDiffInMonth $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(99, $diff1); $this->assertEquals(99, $diff1a); $this->assertEquals(-99, $diff2); @@ -2075,10 +2075,10 @@ public function testDifferentYearEqualMonthEqualDayNormalYearNormalDateAndNormal $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2026, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(99, $diff1); $this->assertEquals(99, $diff1a); $this->assertEquals(-99, $diff2); @@ -2090,10 +2090,10 @@ public function testDifferentYearEqualMonthEqualDayNormalYearNormalDateAndLeapYe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(86, $diff1); $this->assertEquals(86, $diff1a); $this->assertEquals(-86, $diff2); @@ -2105,10 +2105,10 @@ public function testDifferentYearEqualMonthEqualDayNormalYearNormalDateAndLeapYe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(86, $diff1); $this->assertEquals(86, $diff1a); $this->assertEquals(-86, $diff2); @@ -2120,10 +2120,10 @@ public function testDifferentYearEqualMonthEqualDayNormalYearNormalDateAndLeapYe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 7, 10, false); $lunar2 = $calendar->lunar(2025, 7, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(87, $diff1); $this->assertEquals(87, $diff1a); $this->assertEquals(-87, $diff2); @@ -2135,10 +2135,10 @@ public function testDifferentYearEqualMonthEqualDayNormalYearNormalDateAndLeapDa $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(87, $diff1); $this->assertEquals(87, $diff1a); $this->assertEquals(-87, $diff2); @@ -2150,10 +2150,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateLessThanLea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2026, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(75, $diff1); $this->assertEquals(75, $diff1a); $this->assertEquals(-75, $diff2); @@ -2165,10 +2165,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateLessThanLea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(62, $diff1); $this->assertEquals(62, $diff1a); $this->assertEquals(-62, $diff2); @@ -2180,10 +2180,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateLessThanLea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(136, $diff1); $this->assertEquals(136, $diff1a); $this->assertEquals(-136, $diff2); @@ -2195,10 +2195,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateLessThanLea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(75, $diff1); $this->assertEquals(75, $diff1a); $this->assertEquals(-75, $diff2); @@ -2210,10 +2210,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateLessThanLea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(137, $diff1); $this->assertEquals(137, $diff1a); $this->assertEquals(-137, $diff2); @@ -2225,10 +2225,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateEqualLeapMo $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2026, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(112, $diff1); $this->assertEquals(112, $diff1a); $this->assertEquals(-112, $diff2); @@ -2240,10 +2240,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateEqualLeapMo $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2033, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(198, $diff1); $this->assertEquals(198, $diff1a); $this->assertEquals(-198, $diff2); @@ -2255,10 +2255,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateEqualLeapMo $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(99, $diff1); $this->assertEquals(99, $diff1a); $this->assertEquals(-99, $diff2); @@ -2270,10 +2270,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateEqualLeapMo $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2028, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(137, $diff1); $this->assertEquals(137, $diff1a); $this->assertEquals(-137, $diff2); @@ -2285,10 +2285,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateEqualLeapMo $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(100, $diff1); $this->assertEquals(100, $diff1a); $this->assertEquals(-100, $diff2); @@ -2300,10 +2300,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateGreaterThan $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2026, 4, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(73, $diff1); $this->assertEquals(73, $diff1a); $this->assertEquals(-73, $diff2); @@ -2315,10 +2315,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateGreaterThan $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2033, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(160, $diff1); $this->assertEquals(160, $diff1a); $this->assertEquals(-160, $diff2); @@ -2330,10 +2330,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateGreaterThan $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(98, $diff1); $this->assertEquals(98, $diff1a); $this->assertEquals(-98, $diff2); @@ -2345,10 +2345,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateGreaterThan $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2031, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(136, $diff1); $this->assertEquals(136, $diff1a); $this->assertEquals(-136, $diff2); @@ -2360,10 +2360,10 @@ public function testDifferentYearEqualMonthEqualDayLeapYearNormalDateGreaterThan $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(99, $diff1); $this->assertEquals(99, $diff1a); $this->assertEquals(-99, $diff2); @@ -2375,10 +2375,10 @@ public function testDifferentYearEqualMonthEqualDayLeapDateAndNormalYearNormalDa $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2026, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(111, $diff1); $this->assertEquals(111, $diff1a); $this->assertEquals(-111, $diff2); @@ -2390,10 +2390,10 @@ public function testDifferentYearEqualMonthEqualDayLeapDateAndLeapYearNormalDate $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2033, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(197, $diff1); $this->assertEquals(197, $diff1a); $this->assertEquals(-197, $diff2); @@ -2405,10 +2405,10 @@ public function testDifferentYearEqualMonthEqualDayLeapDateAndLeapYearNormalDate $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2025, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(98, $diff1); $this->assertEquals(98, $diff1a); $this->assertEquals(-98, $diff2); @@ -2420,10 +2420,10 @@ public function testDifferentYearEqualMonthEqualDayLeapDateAndLeapYearNormalDate $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2028, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(136, $diff1); $this->assertEquals(136, $diff1a); $this->assertEquals(-136, $diff2); @@ -2435,10 +2435,10 @@ public function testDifferentYearEqualMonthEqualDayLeapDateAndLeapDateDiffInMont $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(99, $diff1); $this->assertEquals(99, $diff1a); $this->assertEquals(-99, $diff2); @@ -2454,10 +2454,10 @@ public function testDifferentYearEqualMonthGreaterDayNormalYearNormalDateAndNorm $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2026, 2, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(98, $diff1); $this->assertEquals(98, $diff1a); $this->assertEquals(-98, $diff2); @@ -2469,10 +2469,10 @@ public function testDifferentYearEqualMonthGreaterDayNormalYearNormalDateAndLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2025, 2, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(85, $diff1); $this->assertEquals(85, $diff1a); $this->assertEquals(-85, $diff2); @@ -2484,10 +2484,10 @@ public function testDifferentYearEqualMonthGreaterDayNormalYearNormalDateAndLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(85, $diff1); $this->assertEquals(85, $diff1a); $this->assertEquals(-85, $diff2); @@ -2499,10 +2499,10 @@ public function testDifferentYearEqualMonthGreaterDayNormalYearNormalDateAndLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 7, 10, false); $lunar2 = $calendar->lunar(2025, 7, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(86, $diff1); $this->assertEquals(86, $diff1a); $this->assertEquals(-86, $diff2); @@ -2514,10 +2514,10 @@ public function testDifferentYearEqualMonthGreaterDayNormalYearNormalDateAndLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 1, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(86, $diff1); $this->assertEquals(86, $diff1a); $this->assertEquals(-86, $diff2); @@ -2529,10 +2529,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateLessThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2026, 2, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(74, $diff1); $this->assertEquals(74, $diff1a); $this->assertEquals(-74, $diff2); @@ -2544,10 +2544,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateLessThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 2, 10, false); $lunar2 = $calendar->lunar(2025, 2, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(61, $diff1); $this->assertEquals(61, $diff1a); $this->assertEquals(-61, $diff2); @@ -2559,10 +2559,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateLessThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(135, $diff1); $this->assertEquals(135, $diff1a); $this->assertEquals(-135, $diff2); @@ -2574,10 +2574,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateLessThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 5, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(74, $diff1); $this->assertEquals(74, $diff1a); $this->assertEquals(-74, $diff2); @@ -2589,10 +2589,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateLessThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 1, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(136, $diff1); $this->assertEquals(136, $diff1a); $this->assertEquals(-136, $diff2); @@ -2604,10 +2604,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateEqualLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2026, 6, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(111, $diff1); $this->assertEquals(111, $diff1a); $this->assertEquals(-111, $diff2); @@ -2619,10 +2619,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateEqualLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2033, 6, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(197, $diff1); $this->assertEquals(197, $diff1a); $this->assertEquals(-197, $diff2); @@ -2634,10 +2634,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateEqualLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(98, $diff1); $this->assertEquals(98, $diff1a); $this->assertEquals(-98, $diff2); @@ -2649,10 +2649,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateEqualLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2028, 6, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(136, $diff1); $this->assertEquals(136, $diff1a); $this->assertEquals(-136, $diff2); @@ -2664,10 +2664,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateEqualLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 1, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(99, $diff1); $this->assertEquals(99, $diff1a); $this->assertEquals(-99, $diff2); @@ -2679,10 +2679,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateGreaterTh $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2026, 4, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(72, $diff1); $this->assertEquals(72, $diff1a); $this->assertEquals(-72, $diff2); @@ -2694,10 +2694,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateGreaterTh $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2033, 5, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(159, $diff1); $this->assertEquals(159, $diff1a); $this->assertEquals(-159, $diff2); @@ -2709,10 +2709,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateGreaterTh $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(97, $diff1); $this->assertEquals(97, $diff1a); $this->assertEquals(-97, $diff2); @@ -2724,10 +2724,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateGreaterTh $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2031, 5, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(135, $diff1); $this->assertEquals(135, $diff1a); $this->assertEquals(-135, $diff2); @@ -2739,10 +2739,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapYearNormalDateGreaterTh $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 5, 10, false); $lunar2 = $calendar->lunar(2028, 5, 1, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(98, $diff1); $this->assertEquals(98, $diff1a); $this->assertEquals(-98, $diff2); @@ -2754,10 +2754,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapDateAndNormalYearNormal $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2026, 6, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(110, $diff1); $this->assertEquals(110, $diff1a); $this->assertEquals(-110, $diff2); @@ -2769,10 +2769,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapDateAndLeapYearNormalDa $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2033, 6, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(196, $diff1); $this->assertEquals(196, $diff1a); $this->assertEquals(-196, $diff2); @@ -2784,10 +2784,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapDateAndLeapYearNormalDa $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2025, 6, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(97, $diff1); $this->assertEquals(97, $diff1a); $this->assertEquals(-97, $diff2); @@ -2799,10 +2799,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapDateAndLeapYearNormalDa $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2028, 6, 1, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(135, $diff1); $this->assertEquals(135, $diff1a); $this->assertEquals(-135, $diff2); @@ -2814,10 +2814,10 @@ public function testDifferentYearEqualMonthGreaterDayLeapDateAndLeapDateDiffInMo $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2025, 6, 1, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(98, $diff1); $this->assertEquals(98, $diff1a); $this->assertEquals(-98, $diff2); @@ -2833,10 +2833,10 @@ public function testDifferentYearGreaterMonthLessDayNormalYearNormalDateAndNorma $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2026, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(95, $diff1); $this->assertEquals(95, $diff1a); $this->assertEquals(-95, $diff2); @@ -2848,10 +2848,10 @@ public function testDifferentYearGreaterMonthLessDayNormalYearNormalDateAndLeapY $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2025, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(82, $diff1); $this->assertEquals(82, $diff1a); $this->assertEquals(-82, $diff2); @@ -2863,10 +2863,10 @@ public function testDifferentYearGreaterMonthLessDayNormalYearNormalDateAndLeapY $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 7, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(85, $diff1); $this->assertEquals(85, $diff1a); $this->assertEquals(-85, $diff2); @@ -2878,10 +2878,10 @@ public function testDifferentYearGreaterMonthLessDayNormalYearNormalDateAndLeapY $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 8, 10, false); $lunar2 = $calendar->lunar(2025, 7, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(86, $diff1); $this->assertEquals(86, $diff1a); $this->assertEquals(-86, $diff2); @@ -2893,10 +2893,10 @@ public function testDifferentYearGreaterMonthLessDayNormalYearNormalDateAndLeapD $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 7, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(86, $diff1); $this->assertEquals(86, $diff1a); $this->assertEquals(-86, $diff2); @@ -2908,10 +2908,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateLessThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 3, 10, false); $lunar2 = $calendar->lunar(2026, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(74, $diff1); $this->assertEquals(74, $diff1a); $this->assertEquals(-74, $diff2); @@ -2923,10 +2923,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateLessThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 3, 10, false); $lunar2 = $calendar->lunar(2025, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(61, $diff1); $this->assertEquals(61, $diff1a); $this->assertEquals(-61, $diff2); @@ -2938,10 +2938,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateLessThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(71, $diff1); $this->assertEquals(71, $diff1a); $this->assertEquals(-71, $diff2); @@ -2953,10 +2953,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateLessThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 4, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(74, $diff1); $this->assertEquals(74, $diff1a); $this->assertEquals(-74, $diff2); @@ -2968,10 +2968,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateLessThanLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 2, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(72, $diff1); $this->assertEquals(72, $diff1a); $this->assertEquals(-72, $diff2); @@ -2983,10 +2983,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateEqualLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2026, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(111, $diff1); $this->assertEquals(111, $diff1a); $this->assertEquals(-111, $diff2); @@ -2998,10 +2998,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateEqualLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2033, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(197, $diff1); $this->assertEquals(197, $diff1a); $this->assertEquals(-197, $diff2); @@ -3013,10 +3013,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateEqualLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2023, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(70, $diff1); $this->assertEquals(70, $diff1a); $this->assertEquals(-70, $diff2); @@ -3028,10 +3028,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateEqualLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2023, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(74, $diff1); $this->assertEquals(74, $diff1a); $this->assertEquals(-74, $diff2); @@ -3043,10 +3043,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateEqualLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2023, 2, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(71, $diff1); $this->assertEquals(71, $diff1a); $this->assertEquals(-71, $diff2); @@ -3058,10 +3058,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateGreaterTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2026, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(109, $diff1); $this->assertEquals(109, $diff1a); $this->assertEquals(-109, $diff2); @@ -3073,10 +3073,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateGreaterTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2033, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(195, $diff1); $this->assertEquals(195, $diff1a); $this->assertEquals(-195, $diff2); @@ -3088,10 +3088,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateGreaterTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2023, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(68, $diff1); $this->assertEquals(68, $diff1a); $this->assertEquals(-68, $diff2); @@ -3103,10 +3103,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateGreaterTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2023, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(72, $diff1); $this->assertEquals(72, $diff1a); $this->assertEquals(-72, $diff2); @@ -3118,10 +3118,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearNormalDateGreaterTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2023, 2, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(69, $diff1); $this->assertEquals(69, $diff1a); $this->assertEquals(-69, $diff2); @@ -3133,10 +3133,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearLeapDateAndNormalYea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2026, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(110, $diff1); $this->assertEquals(110, $diff1a); $this->assertEquals(-110, $diff2); @@ -3148,10 +3148,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearLeapDateAndLeapYearN $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2033, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(196, $diff1); $this->assertEquals(196, $diff1a); $this->assertEquals(-196, $diff2); @@ -3163,10 +3163,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearLeapDateAndLeapYearN $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2023, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(69, $diff1); $this->assertEquals(69, $diff1a); $this->assertEquals(-69, $diff2); @@ -3178,10 +3178,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearLeapDateAndLeapYearN $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2023, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(73, $diff1); $this->assertEquals(73, $diff1a); $this->assertEquals(-73, $diff2); @@ -3193,10 +3193,10 @@ public function testDifferentYearGreaterMonthLessDayLeapYearLeapDateAndLeapDateD $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2023, 2, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(70, $diff1); $this->assertEquals(70, $diff1a); $this->assertEquals(-70, $diff2); @@ -3212,10 +3212,10 @@ public function testDifferentYearGreaterMonthEqualDayNormalYearNormalDateAndNorm $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2026, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(95, $diff1); $this->assertEquals(95, $diff1a); $this->assertEquals(-95, $diff2); @@ -3227,10 +3227,10 @@ public function testDifferentYearGreaterMonthEqualDayNormalYearNormalDateAndLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2025, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(82, $diff1); $this->assertEquals(82, $diff1a); $this->assertEquals(-82, $diff2); @@ -3242,10 +3242,10 @@ public function testDifferentYearGreaterMonthEqualDayNormalYearNormalDateAndLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 7, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(85, $diff1); $this->assertEquals(85, $diff1a); $this->assertEquals(-85, $diff2); @@ -3257,10 +3257,10 @@ public function testDifferentYearGreaterMonthEqualDayNormalYearNormalDateAndLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 8, 10, false); $lunar2 = $calendar->lunar(2025, 7, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(86, $diff1); $this->assertEquals(86, $diff1a); $this->assertEquals(-86, $diff2); @@ -3272,10 +3272,10 @@ public function testDifferentYearGreaterMonthEqualDayNormalYearNormalDateAndLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 7, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(86, $diff1); $this->assertEquals(86, $diff1a); $this->assertEquals(-86, $diff2); @@ -3287,10 +3287,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateLessThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 3, 10, false); $lunar2 = $calendar->lunar(2026, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(74, $diff1); $this->assertEquals(74, $diff1a); $this->assertEquals(-74, $diff2); @@ -3302,10 +3302,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateLessThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 3, 10, false); $lunar2 = $calendar->lunar(2025, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(61, $diff1); $this->assertEquals(61, $diff1a); $this->assertEquals(-61, $diff2); @@ -3317,10 +3317,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateLessThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(71, $diff1); $this->assertEquals(71, $diff1a); $this->assertEquals(-71, $diff2); @@ -3332,10 +3332,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateLessThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 4, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(74, $diff1); $this->assertEquals(74, $diff1a); $this->assertEquals(-74, $diff2); @@ -3347,10 +3347,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateLessThanL $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 2, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(72, $diff1); $this->assertEquals(72, $diff1a); $this->assertEquals(-72, $diff2); @@ -3362,10 +3362,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateEqualLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2026, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(111, $diff1); $this->assertEquals(111, $diff1a); $this->assertEquals(-111, $diff2); @@ -3377,10 +3377,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateEqualLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2033, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(197, $diff1); $this->assertEquals(197, $diff1a); $this->assertEquals(-197, $diff2); @@ -3392,10 +3392,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateEqualLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2023, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(70, $diff1); $this->assertEquals(70, $diff1a); $this->assertEquals(-70, $diff2); @@ -3407,10 +3407,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateEqualLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2023, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(74, $diff1); $this->assertEquals(74, $diff1a); $this->assertEquals(-74, $diff2); @@ -3422,10 +3422,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateEqualLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2023, 2, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(71, $diff1); $this->assertEquals(71, $diff1a); $this->assertEquals(-71, $diff2); @@ -3437,10 +3437,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateGreaterTh $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2026, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(109, $diff1); $this->assertEquals(109, $diff1a); $this->assertEquals(-109, $diff2); @@ -3452,10 +3452,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateGreaterTh $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2033, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(195, $diff1); $this->assertEquals(195, $diff1a); $this->assertEquals(-195, $diff2); @@ -3467,10 +3467,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateGreaterTh $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2023, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(68, $diff1); $this->assertEquals(68, $diff1a); $this->assertEquals(-68, $diff2); @@ -3482,10 +3482,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateGreaterTh $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2023, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(72, $diff1); $this->assertEquals(72, $diff1a); $this->assertEquals(-72, $diff2); @@ -3497,10 +3497,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearNormalDateGreaterTh $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2023, 2, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(69, $diff1); $this->assertEquals(69, $diff1a); $this->assertEquals(-69, $diff2); @@ -3512,10 +3512,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearLeapDateAndNormalYe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2026, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(110, $diff1); $this->assertEquals(110, $diff1a); $this->assertEquals(-110, $diff2); @@ -3527,10 +3527,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearLeapDateAndLeapYear $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2033, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(196, $diff1); $this->assertEquals(196, $diff1a); $this->assertEquals(-196, $diff2); @@ -3542,10 +3542,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearLeapDateAndLeapYear $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2023, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(69, $diff1); $this->assertEquals(69, $diff1a); $this->assertEquals(-69, $diff2); @@ -3557,10 +3557,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearLeapDateAndLeapYear $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2023, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(73, $diff1); $this->assertEquals(73, $diff1a); $this->assertEquals(-73, $diff2); @@ -3572,10 +3572,10 @@ public function testDifferentYearGreaterMonthEqualDayLeapYearLeapDateAndLeapDate $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2023, 2, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(70, $diff1); $this->assertEquals(70, $diff1a); $this->assertEquals(-70, $diff2); @@ -3591,10 +3591,10 @@ public function testDifferentYearGreaterMonthGreaterDayNormalYearNormalDateAndNo $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2026, 2, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(94, $diff1); $this->assertEquals(94, $diff1a); $this->assertEquals(-94, $diff2); @@ -3606,10 +3606,10 @@ public function testDifferentYearGreaterMonthGreaterDayNormalYearNormalDateAndLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 6, 10, false); $lunar2 = $calendar->lunar(2025, 2, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(81, $diff1); $this->assertEquals(81, $diff1a); $this->assertEquals(-81, $diff2); @@ -3621,10 +3621,10 @@ public function testDifferentYearGreaterMonthGreaterDayNormalYearNormalDateAndLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 7, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(84, $diff1); $this->assertEquals(84, $diff1a); $this->assertEquals(-84, $diff2); @@ -3636,10 +3636,10 @@ public function testDifferentYearGreaterMonthGreaterDayNormalYearNormalDateAndLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 8, 10, false); $lunar2 = $calendar->lunar(2025, 7, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(85, $diff1); $this->assertEquals(85, $diff1a); $this->assertEquals(-85, $diff2); @@ -3651,10 +3651,10 @@ public function testDifferentYearGreaterMonthGreaterDayNormalYearNormalDateAndLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 7, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(85, $diff1); $this->assertEquals(85, $diff1a); $this->assertEquals(-85, $diff2); @@ -3666,10 +3666,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateLessTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 3, 10, false); $lunar2 = $calendar->lunar(2026, 2, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(73, $diff1); $this->assertEquals(73, $diff1a); $this->assertEquals(-73, $diff2); @@ -3681,10 +3681,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateLessTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2020, 3, 10, false); $lunar2 = $calendar->lunar(2025, 2, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(60, $diff1); $this->assertEquals(60, $diff1a); $this->assertEquals(-60, $diff2); @@ -3696,10 +3696,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateLessTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 2, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(70, $diff1); $this->assertEquals(70, $diff1a); $this->assertEquals(-70, $diff2); @@ -3711,10 +3711,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateLessTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 4, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(73, $diff1); $this->assertEquals(73, $diff1a); $this->assertEquals(-73, $diff2); @@ -3726,10 +3726,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateLessTha $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 5, 10, false); $lunar2 = $calendar->lunar(2023, 2, 9, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(71, $diff1); $this->assertEquals(71, $diff1a); $this->assertEquals(-71, $diff2); @@ -3741,10 +3741,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateEqualLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2026, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(110, $diff1); $this->assertEquals(110, $diff1a); $this->assertEquals(-110, $diff2); @@ -3756,10 +3756,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateEqualLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2033, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(196, $diff1); $this->assertEquals(196, $diff1a); $this->assertEquals(-196, $diff2); @@ -3771,10 +3771,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateEqualLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2023, 2, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(69, $diff1); $this->assertEquals(69, $diff1a); $this->assertEquals(-69, $diff2); @@ -3786,10 +3786,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateEqualLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2023, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(73, $diff1); $this->assertEquals(73, $diff1a); $this->assertEquals(-73, $diff2); @@ -3801,10 +3801,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateEqualLe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, false); $lunar2 = $calendar->lunar(2023, 2, 9, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(70, $diff1); $this->assertEquals(70, $diff1a); $this->assertEquals(-70, $diff2); @@ -3816,10 +3816,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateGreater $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2026, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(108, $diff1); $this->assertEquals(108, $diff1a); $this->assertEquals(-108, $diff2); @@ -3831,10 +3831,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateGreater $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2033, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(194, $diff1); $this->assertEquals(194, $diff1a); $this->assertEquals(-194, $diff2); @@ -3846,10 +3846,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateGreater $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2023, 2, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(67, $diff1); $this->assertEquals(67, $diff1a); $this->assertEquals(-67, $diff2); @@ -3861,10 +3861,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateGreater $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2023, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(71, $diff1); $this->assertEquals(71, $diff1a); $this->assertEquals(-71, $diff2); @@ -3876,10 +3876,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearNormalDateGreater $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 7, 10, false); $lunar2 = $calendar->lunar(2023, 2, 9, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(68, $diff1); $this->assertEquals(68, $diff1a); $this->assertEquals(-68, $diff2); @@ -3891,10 +3891,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearLeapDateAndNormal $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2026, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(109, $diff1); $this->assertEquals(109, $diff1a); $this->assertEquals(-109, $diff2); @@ -3906,10 +3906,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearLeapDateAndLeapYe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2033, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(195, $diff1); $this->assertEquals(195, $diff1a); $this->assertEquals(-195, $diff2); @@ -3921,10 +3921,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearLeapDateAndLeapYe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2023, 2, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(68, $diff1); $this->assertEquals(68, $diff1a); $this->assertEquals(-68, $diff2); @@ -3936,10 +3936,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearLeapDateAndLeapYe $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2023, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(72, $diff1); $this->assertEquals(72, $diff1a); $this->assertEquals(-72, $diff2); @@ -3951,10 +3951,10 @@ public function testDifferentYearGreaterMonthGreaterDayLeapYearLeapDateAndLeapDa $calendar = new Calendar(); $lunar1 = $calendar->lunar(2017, 6, 10, true); $lunar2 = $calendar->lunar(2023, 2, 9, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(69, $diff1); $this->assertEquals(69, $diff1a); $this->assertEquals(-69, $diff2); @@ -3970,10 +3970,10 @@ public function testSameYearLessMonthLessDayNormalYearNormalDateAndNormalDateDif $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2018, 8, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(6, $diff1); $this->assertEquals(6, $diff1a); $this->assertEquals(-6, $diff2); @@ -3985,10 +3985,10 @@ public function testSameYearLessMonthLessDayLeapYearNormalDateLessThanLeapMonthA $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 2, 10, false); $lunar2 = $calendar->lunar(2025, 5, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4000,10 +4000,10 @@ public function testSameYearLessMonthLessDayLeapYearNormalDateLessThanLeapMonthA $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 3, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4015,10 +4015,10 @@ public function testSameYearLessMonthLessDayLeapYearNormalDateLessThanLeapMonthA $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 5, 10, false); $lunar2 = $calendar->lunar(2025, 7, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4030,10 +4030,10 @@ public function testSameYearLessMonthLessDayLeapYearNormalDateLessThanLeapMonthA $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 4, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4045,10 +4045,10 @@ public function testSameYearLessMonthLessDayLeapYearNormalDateEqualLeapMonthAndN $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, false); $lunar2 = $calendar->lunar(2025, 8, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4060,10 +4060,10 @@ public function testSameYearLessMonthLessDayLeapYearNormalDateGreaterThanLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 7, 10, false); $lunar2 = $calendar->lunar(2025, 10, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4075,10 +4075,10 @@ public function testSameYearLessMonthLessDayLeapYearLeapDateAndNormalDateGreater $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, true); $lunar2 = $calendar->lunar(2025, 9, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4095,10 +4095,10 @@ public function testSameYearLessMonthEqualDayNormalYearNormalDateAndNormalDateDi $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2018, 8, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(6, $diff1); $this->assertEquals(6, $diff1a); $this->assertEquals(-6, $diff2); @@ -4110,10 +4110,10 @@ public function testSameYearLessMonthEqualDayLeapYearNormalDateLessThanLeapMonth $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 2, 10, false); $lunar2 = $calendar->lunar(2025, 5, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4125,10 +4125,10 @@ public function testSameYearLessMonthEqualDayLeapYearNormalDateLessThanLeapMonth $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 3, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4140,10 +4140,10 @@ public function testSameYearLessMonthEqualDayLeapYearNormalDateLessThanLeapMonth $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 5, 10, false); $lunar2 = $calendar->lunar(2025, 7, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4155,10 +4155,10 @@ public function testSameYearLessMonthEqualDayLeapYearNormalDateLessThanLeapMonth $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 4, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4170,10 +4170,10 @@ public function testSameYearLessMonthEqualDayLeapYearNormalDateEqualLeapMonthAnd $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, false); $lunar2 = $calendar->lunar(2025, 8, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4185,10 +4185,10 @@ public function testSameYearLessMonthEqualDayLeapYearNormalDateGreaterThanLeapMo $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 7, 10, false); $lunar2 = $calendar->lunar(2025, 10, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4200,10 +4200,10 @@ public function testSameYearLessMonthEqualDayLeapYearLeapDateAndNormalDateGreate $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, true); $lunar2 = $calendar->lunar(2025, 9, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(3, $diff1); $this->assertEquals(3, $diff1a); $this->assertEquals(-3, $diff2); @@ -4219,10 +4219,10 @@ public function testSameYearLessMonthGreaterDayNormalYearNormalDateAndNormalDate $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 2, 10, false); $lunar2 = $calendar->lunar(2018, 8, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(5, $diff1); $this->assertEquals(5, $diff1a); $this->assertEquals(-5, $diff2); @@ -4234,10 +4234,10 @@ public function testSameYearLessMonthGreaterDayLeapYearNormalDateLessThanLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 2, 10, false); $lunar2 = $calendar->lunar(2025, 5, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(2, $diff1); $this->assertEquals(2, $diff1a); $this->assertEquals(-2, $diff2); @@ -4249,10 +4249,10 @@ public function testSameYearLessMonthGreaterDayLeapYearNormalDateLessThanLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 3, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(2, $diff1); $this->assertEquals(2, $diff1a); $this->assertEquals(-2, $diff2); @@ -4264,10 +4264,10 @@ public function testSameYearLessMonthGreaterDayLeapYearNormalDateLessThanLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 5, 10, false); $lunar2 = $calendar->lunar(2025, 7, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(2, $diff1); $this->assertEquals(2, $diff1a); $this->assertEquals(-2, $diff2); @@ -4279,10 +4279,10 @@ public function testSameYearLessMonthGreaterDayLeapYearNormalDateLessThanLeapMon $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 4, 10, false); $lunar2 = $calendar->lunar(2025, 6, 9, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(2, $diff1); $this->assertEquals(2, $diff1a); $this->assertEquals(-2, $diff2); @@ -4294,10 +4294,10 @@ public function testSameYearLessMonthGreaterDayLeapYearNormalDateEqualLeapMonthA $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, false); $lunar2 = $calendar->lunar(2025, 8, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(2, $diff1); $this->assertEquals(2, $diff1a); $this->assertEquals(-2, $diff2); @@ -4309,10 +4309,10 @@ public function testSameYearLessMonthGreaterDayLeapYearNormalDateGreaterThanLeap $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 7, 10, false); $lunar2 = $calendar->lunar(2025, 10, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(2, $diff1); $this->assertEquals(2, $diff1a); $this->assertEquals(-2, $diff2); @@ -4324,10 +4324,10 @@ public function testSameYearLessMonthGreaterDayLeapYearLeapDateAndNormalDateGrea $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, true); $lunar2 = $calendar->lunar(2025, 9, 9, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(2, $diff1); $this->assertEquals(2, $diff1a); $this->assertEquals(-2, $diff2); @@ -4343,10 +4343,10 @@ public function testSameYearEqualMonthLessDayNormalYearNormalDateAndNormalDateDi $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 8, 10, false); $lunar2 = $calendar->lunar(2018, 8, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff1a); $this->assertEquals(-0, $diff2); @@ -4358,10 +4358,10 @@ public function testSameYearEqualMonthLessDayLeapYearNormalDateLessThanLeapMonth $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 2, 10, false); $lunar2 = $calendar->lunar(2025, 2, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff1a); $this->assertEquals(-0, $diff2); @@ -4373,10 +4373,10 @@ public function testSameYearEqualMonthLessDayLeapYearNormalDateEqualLeapMonthAnd $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff1a); $this->assertEquals(-0, $diff2); @@ -4388,10 +4388,10 @@ public function testSameYearEqualMonthLessDayLeapYearNormalDateGreaterThanLeapMo $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 8, 10, false); $lunar2 = $calendar->lunar(2025, 8, 20, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff1a); $this->assertEquals(-0, $diff2); @@ -4403,10 +4403,10 @@ public function testSameYearEqualMonthLessDayLeapYearNormalDateLessThanLeapMonth $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(1, $diff1); $this->assertEquals(1, $diff1a); $this->assertEquals(-1, $diff2); @@ -4418,10 +4418,10 @@ public function testSameYearEqualMonthLessDayLeapDateAndLeapDateDiffInMonths() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, true); $lunar2 = $calendar->lunar(2025, 6, 20, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff1a); $this->assertEquals(-0, $diff2); @@ -4437,10 +4437,10 @@ public function testSameYearEqualMonthEqualDayNormalYearNormalDateAndNormalDateD $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 8, 10, false); $lunar2 = $calendar->lunar(2018, 8, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff1a); $this->assertEquals(-0, $diff2); @@ -4452,10 +4452,10 @@ public function testSameYearEqualMonthEqualDayLeapYearNormalDateLessThanLeapMont $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 2, 10, false); $lunar2 = $calendar->lunar(2025, 2, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff1a); $this->assertEquals(-0, $diff2); @@ -4467,10 +4467,10 @@ public function testSameYearEqualMonthEqualDayLeapYearNormalDateEqualLeapMonthAn $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff1a); $this->assertEquals(-0, $diff2); @@ -4482,10 +4482,10 @@ public function testSameYearEqualMonthEqualDayLeapYearNormalDateGreaterThanLeapM $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 8, 10, false); $lunar2 = $calendar->lunar(2025, 8, 10, false); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff1a); $this->assertEquals(-0, $diff2); @@ -4497,10 +4497,10 @@ public function testSameYearEqualMonthEqualDayLeapYearNormalDateLessThanLeapMont $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, false); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(1, $diff1); $this->assertEquals(1, $diff1a); $this->assertEquals(-1, $diff2); @@ -4512,10 +4512,10 @@ public function testSameYearEqualMonthEqualDayLeapDateAndLeapDateDiffInMonths() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2025, 6, 10, true); $lunar2 = $calendar->lunar(2025, 6, 10, true); - $diff1 = $calendar->diffInMonths($lunar1, $lunar2); - $diff1a = $calendar->diffInMonths($lunar1, $lunar2, true); - $diff2 = $calendar->diffInMonths($lunar2, $lunar1); - $diff2a = $calendar->diffInMonths($lunar2, $lunar1, true); + $diff1 = $calendar->diffInMonths($lunar1, $lunar2, false); + $diff1a = $calendar->diffInMonths($lunar1, $lunar2); + $diff2 = $calendar->diffInMonths($lunar2, $lunar1, false); + $diff2a = $calendar->diffInMonths($lunar2, $lunar1); $this->assertEquals(0, $diff1); $this->assertEquals(0, $diff1a); $this->assertEquals(-0, $diff2); @@ -4533,10 +4533,10 @@ public function testDiffInDays() $calendar = new Calendar(); $lunar1 = $calendar->lunar(2018, 7, 18, false); $lunar2 = $calendar->lunar(2044, 7, 18, true); - $diff1 = $calendar->diffInDays($lunar1, $lunar2); - $diff1a = $calendar->diffInDays($lunar1, $lunar2, true); - $diff2 = $calendar->diffInDays($lunar2, $lunar1); - $diff2a = $calendar->diffInDays($lunar2, $lunar1, true); + $diff1 = $calendar->diffInDays($lunar1, $lunar2, false); + $diff1a = $calendar->diffInDays($lunar1, $lunar2); + $diff2 = $calendar->diffInDays($lunar2, $lunar1, false); + $diff2a = $calendar->diffInDays($lunar2, $lunar1); $this->assertEquals(9509, $diff1); $this->assertEquals(9509, $diff1a); $this->assertEquals(-9509, $diff2); From e797758f5d01c056ac61c669fa84aac72eeb8f1e Mon Sep 17 00:00:00 2001 From: hao li Date: Wed, 29 Aug 2018 14:49:39 +0800 Subject: [PATCH 3/3] fix array index out range problem of getAnimal --- src/Calendar.php | 10 ++++------ tests/CalendarTest.php | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/Calendar.php b/src/Calendar.php index daba544..1c2e736 100644 --- a/src/Calendar.php +++ b/src/Calendar.php @@ -502,12 +502,10 @@ public function toChinaDay($day) */ public function getAnimal($year, $termIndex = null) { - $animalIndex = ($year - 4) % 12; - if (null !== $termIndex) { - if (3 > $termIndex) { - $animalIndex += 1; - } - } + // 认为此逻辑不需要,详情参见 ganZhiYear 相关注释 + $adjust = null !== $termIndex && 3 > $termIndex ? 1 : 0; + + $animalIndex = ($year + $adjust - 4) % 12; return $this->animals[$animalIndex]; } diff --git a/tests/CalendarTest.php b/tests/CalendarTest.php index 9708ddd..82ee536 100644 --- a/tests/CalendarTest.php +++ b/tests/CalendarTest.php @@ -4910,4 +4910,22 @@ public function testSubDaysOverYears() } #endregion subDays + + #region getAnimal + + public function testMouseGetAnimal() + { + $calendar = new Calendar(); + $animal = $calendar->getAnimal(1984); + $this->assertEquals('鼠', $animal); + } + + public function testPigGetAnimal() + { + $calendar = new Calendar(); + $animal = $calendar->getAnimal(1983); + $this->assertEquals('猪', $animal); + } + + #endregion getAnimal }