Solar

package
v0.0.0-...-fa63c2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	N = 605
)

六宫常数

Variables

View Source
var AllJiaZi = [60]string{"癸亥",
	"甲子", "乙丑", "丙寅", "丁卯", "戊辰", "己已", "庚午", "辛未", "壬申", "癸酉",
	"甲戌", "乙亥", "丙子", "丁丑", "戊寅", "己卯", "庚辰", "辛已", "壬午", "癸未",
	"甲申", "乙酉", "丙戌", "丁亥", "戊子", "已丑", "庚寅", "辛卯", "壬辰", "癸巳",
	"甲午", "乙未", "丙申", "丁酉", "戊戌", "已亥", "庚子", "辛丑", "壬寅", "癸卯",
	"甲辰", "乙已", "丙午", "丁未", "戊申", "己酉", "庚戌", "辛亥", "壬子", "癸丑",
	"甲寅", "乙卯", "丙辰", "丁已", "戊午", "已未", "庚申", "辛酉", "壬戌"}

六十甲子 0代表序号60即最后癸亥

View Source
var M = [12]int{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}

月份 这里不管润不润2月都是28

View Source
var ShengXiao = "猴"
View Source
var T = time.Now().Year()

当前年份

View Source
var XingSu28 = [28]string{"轸",
	"角", "亢", "氐", "房", "心", "尾", "箕",
	"斗", "牛", "女", "虚", "危", "室", "壁",
	"奎", "娄", "胃", "昴", "毕", "觜", "参",
	"井", "鬼", "柳", "星", "张", "翼"}

二十八宿 0轸 1角 2亢...

View Source
var Year, _, Day = time.Now().Date()

时间 生肖变量

Functions

func A4

func A4(y int, m int, d int) int

公式4 实际天数

func AfterYear

func AfterYear(y int, m int, d int, x int) int

1701之后的C值 X误差修正值

func AllMonthGanZhi

func AllMonthGanZhi(m int, fdi int) []int

返回干支对应的数字索引号

func B5

func B5(y int, m int, d int) int

公式 5 月日总合

func C6

func C6(y int, m int, d int) int

公式 6 润日C的计算

func Defaults

func Defaults(y int, m int, d int, h int, s string)

当前时日默认值(当前时间)

func FindJiGan

func FindJiGan(吉干 int) (_jg []int)

匹配月份吉干

func Hours

func Hours() int

十二小时制 下午:一点 两点为未时 三点 四点 申时 五点六点 酉时 七点八点 戌时 九点十点 亥时 十一点十二点子时

func Info

func Info()

func IsShengxiao

func IsShengxiao() string

匹配生肖

func JiRi

func JiRi(y int, m int, d int) (f func() map[int]string)

生成吉日

func JiaZi

func JiaZi(y int, m int, d int) int

公式2 日干支 60甲子索引号

func MonthGZ

func MonthGZ(d int, indexAllJiazi int) (fdi int)

根据index的值和d值确定当月的第一天的干支

func Months

func Months() int

转换月份为int类型

func ShowMD

func ShowMD()

显示当前时日

func TheMonthJiGan

func TheMonthJiGan(m int) []int

计算月份吉干

func Weeks

func Weeks(y int, m int, d int)

公式1 计算星期

func XingSu

func XingSu(y int, m int, d int) int

公式3 二十八宿

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL