From 0a298130a93a7cf75e5a5f56ff9be6201a6a6f0f Mon Sep 17 00:00:00 2001 From: Peleus <245629560@qq.com> Date: Wed, 6 Mar 2024 08:06:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- difference_unit_test.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/difference_unit_test.go b/difference_unit_test.go index c0c8656..6e06888 100755 --- a/difference_unit_test.go +++ b/difference_unit_test.go @@ -477,15 +477,15 @@ func TestCarbon_DiffInDuration(t *testing.T) { }{ 0: {now, "0s"}, - 1: {now.AddYearsNoOverflow(1), "-8784h0m0s"}, - 2: {now.SubYearsNoOverflow(1), "8760h0m0s"}, - 3: {now.AddYearsNoOverflow(10), "-87672h0m0s"}, - 4: {now.SubYearsNoOverflow(10), "87648h0m0s"}, + 1: {now.AddYearsNoOverflow(1), "-8760h0m0s"}, + 2: {now.SubYearsNoOverflow(1), "8784h0m0s"}, + 3: {now.AddYearsNoOverflow(10), "-87648h0m0s"}, + 4: {now.SubYearsNoOverflow(10), "87672h0m0s"}, - 5: {now.AddMonthsNoOverflow(1), "-696h0m0s"}, - 6: {now.SubMonthsNoOverflow(1), "744h0m0s"}, - 7: {now.AddMonthsNoOverflow(10), "-7296h0m0s"}, - 8: {now.SubMonthsNoOverflow(10), "7344h0m0s"}, + 5: {now.AddMonthsNoOverflow(1), "-744h0m0s"}, + 6: {now.SubMonthsNoOverflow(1), "696h0m0s"}, + 7: {now.AddMonthsNoOverflow(10), "-7344h0m0s"}, + 8: {now.SubMonthsNoOverflow(10), "7320h0m0s"}, 9: {now.AddDays(1), "-24h0m0s"}, 10: {now.SubDays(1), "24h0m0s"}, @@ -525,15 +525,15 @@ func TestCarbon_DiffAbsInDuration(t *testing.T) { }{ 0: {now, "0s"}, - 1: {now.AddYearsNoOverflow(1), "8784h0m0s"}, - 2: {now.SubYearsNoOverflow(1), "8760h0m0s"}, - 3: {now.AddYearsNoOverflow(10), "87672h0m0s"}, - 4: {now.SubYearsNoOverflow(10), "87648h0m0s"}, + 1: {now.AddYearsNoOverflow(1), "8760h0m0s"}, + 2: {now.SubYearsNoOverflow(1), "8784h0m0s"}, + 3: {now.AddYearsNoOverflow(10), "87648h0m0s"}, + 4: {now.SubYearsNoOverflow(10), "87672h0m0s"}, - 5: {now.AddMonthsNoOverflow(1), "696h0m0s"}, - 6: {now.SubMonthsNoOverflow(1), "744h0m0s"}, - 7: {now.AddMonthsNoOverflow(10), "7296h0m0s"}, - 8: {now.SubMonthsNoOverflow(10), "7344h0m0s"}, + 5: {now.AddMonthsNoOverflow(1), "744h0m0s"}, + 6: {now.SubMonthsNoOverflow(1), "696h0m0s"}, + 7: {now.AddMonthsNoOverflow(10), "7344h0m0s"}, + 8: {now.SubMonthsNoOverflow(10), "7320h0m0s"}, 9: {now.AddDays(1), "24h0m0s"}, 10: {now.SubDays(1), "24h0m0s"},