mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-11 03:13:46 +00:00
fix(amlich): extract continuity condition to satisfy staticcheck QF1001
This commit is contained in:
1 parent
547bd9be07
commit
5ad388c597
1 file changed
+2
-1
@@ -76,7 +76,8 @@ func TestSolarLunarRoundTrip(t *testing.T) {
|
||||
}
|
||||
// Consecutive solar days are either consecutive lunar days or the
|
||||
// first day after a month of 29 or 30 days.
|
||||
if jd > start && lunarDay != prevDay+1 && !(lunarDay == 1 && (prevDay == 29 || prevDay == 30)) {
|
||||
startsNewMonth := lunarDay == 1 && (prevDay == 29 || prevDay == 30)
|
||||
if jd > start && lunarDay != prevDay+1 && !startsNewMonth {
|
||||
t.Fatalf("discontinuity at %d/%d/%d: lunar day %d after %d",
|
||||
solarDay, solarMonth, solarYear, lunarDay, prevDay)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user