-
Notifications
You must be signed in to change notification settings - Fork 0
/
wxXunHuan_test
44 lines (41 loc) · 1.34 KB
/
wxXunHuan_test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package wxXunHuan
import (
"fmt"
"testing"
)
func Test0001(test *testing.T) {
//太极
list := CreateList()
//两仪
//s := []string{"阴", "阳"}
//四象
//s := []string{"老阴", "少阳","老阳","少阴"}
//四方
//s := []string{"北", "东","南","西"}
//八卦
//s := []string{"坎", "艮", "震","巽", "离","坤", "兑","乾"}
//八方
//s := []string{"北", "东北", "东","东南", "南","西南", "西","西北"}
//十天干
//s := []string{"甲", "乙","丙","丁","戊","己","庚","辛","壬","癸"}
//十二地址
//s := []string{"子", "丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"}
s := []string{"子", "癸","丑","艮","寅","甲","卯","乙","辰","巽","巳","丙","午","丁","未","坤","申","庚","酉","辛","戌","乾","亥","壬"}
for _, v := range s {
list.PushBack(v)
}
list.Print()
fmt.Println(list.FindByAngle(-16).Data)
list.Print()
list.ForWard(2)
list.Print()
list.Reverse()
list.Print()
}
func TestGetSolarTerm(t *testing.T) {
obj := solar2lunar(2018, 10, 17)
obj1 := lunar2solar(2018, 9, 19, false)
fmt.Println(obj.animal, obj.ganzhiYear, obj.ganzhiMonth, obj.ganzhiDay, obj.lunarYear, obj.lunarMonthChineseName, obj.lunarDayChineseName, obj.weekChineseName)
fmt.Println(obj1.solarYear, obj1.solarMonth, obj1.solarDay, obj1.term)
fmt.Println(leapDays(1987))
}