This commit is contained in:
2025-01-31 15:35:36 +08:00
parent d479d39352
commit 1952df0c30
9 changed files with 19 additions and 42 deletions
+7 -3
View File
@@ -4,6 +4,7 @@ import (
"b612.me/astro/tools"
"fmt"
"math"
"os"
"testing"
"time"
)
@@ -162,17 +163,20 @@ func TestJQDate(t *testing.T) {
return math.Floor(d) + 0.5
}
c := 0
var info string
for year := 1900; year <= 2600; year++ {
for pos := 0; pos < 360; pos += 15 {
n := newGetJQTime(year, pos)
o := GetJQTime(year, pos)
n := newGetJQTime(year, pos) + 8.0/24.000000
o := GetJQTime(year, pos) + 8.0/24.0000000
if trimDay(n) != trimDay(o) {
c++
fmt.Printf("\"%d%03d\":%.0f,", year, pos, trimDay(o)-trimDay(n))
fmt.Printf("\"%d%03d\"=>%v %v\n", year, pos, JDE2Date(trimDay(o)), JDE2Date(trimDay(n)))
info += fmt.Sprintf("\"%d%03d\"=>%.0f,", year, pos, trimDay(o)-trimDay(n))
}
}
}
fmt.Println(c)
os.WriteFile("test.txt", []byte(info), 0644)
}
func newGetJQTime(Year, Angle int) float64 { //节气时间