moon buf fix

This commit is contained in:
2019-11-04 19:18:45 +08:00
parent 11702093ed
commit 08fcbf9f89
3 changed files with 25 additions and 13 deletions
+6
View File
@@ -133,6 +133,9 @@ func RiseTime(jde, lon, lat, timezone float64, aero bool) (float64, error) {
tz = 1
}
tm := basic.GetMoonRiseTime(jde, lon, lat, timezone, tz)
if tm == -3 {
err = errors.New("非今日")
}
if tm == -2 {
err = errors.New("极夜")
}
@@ -157,6 +160,9 @@ func DownTime(jde, lon, lat, timezone float64, aero bool) (float64, error) {
tz = 1
}
tm := basic.GetMoonDownTime(jde, lon, lat, timezone, tz)
if tm == -3 {
err = errors.New("非今日")
}
if tm == -2 {
err = errors.New("极夜")
}