mirror of
https://gitee.com/dromara/carbon.git
synced 2024-11-30 03:07:36 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
5a605637b0
@ -2,7 +2,6 @@ package carbon
|
||||
|
||||
import (
|
||||
"math"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -102,7 +101,7 @@ func (c Carbon) ToChineseDayString() string {
|
||||
x := (44*(c.Century()-1) + (c.Century()-1)/4 + 9) % 60
|
||||
// 计算月基数m
|
||||
m := (int(math.Pow(-1, float64(c.Month())))+1)/2*30 + (3*c.Month()-7)/5
|
||||
|
||||
|
||||
index := (s/4*6 + 5*(s/4*3+u) + m + d + x) % 60
|
||||
return stemsAndBranches[index-1]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user