ganz

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ganz Chinese Traditional Heavenly Stems and Earthly Branches(天干地支). Refer to <GB/T 33661-2017> http://c.gb688.cn/bzgk/gb/showGb?type=online&hcno=E107EA4DE9725EDF819F33C60A44B296

Index

Constants

View Source
const (
	// TianGan Heavenly Stems(H-S)
	// reference link: https://mp.weixin.qq.com/s?__biz=MzA4MDM1NzYyNQ==&mid=2650691138&idx=1&sn=ca580627fbd7d910d282763450fa065f&chksm=87af87d4b0d80ec2f8a2335259dac634390bd215f45ffd973542047dbc271f052c1d5554c74c&scene=27
	// 甲   1H, the first of the ten Heavenly Stems.
	// 乙   2H, the first of the ten Heavenly Stems.
	TianGan = "甲乙丙丁戊己庚辛壬癸"
	// DiZhi Earthly Branches (E-B)
	// 子   1E, the first of the twelve Earthly Branches.
	// 丑   2E, the 2nd of the twelve Earthly Branches.
	DiZhi      = "子丑寅卯辰巳午未申酉戌亥"
	DiZhiMonth = "冬月,腊月,正月,二月,三月,四月,五月,六月,七月,八月,九月,十月"
	DiZhiTime  = "夜半,鸡鸣,平旦,日出,食时,隅中,日中,日昳,哺时,日入,黄昏,人定"
	Zodiac     = "鼠牛虎兔龙蛇马羊猴鸡狗猪"
)

Variables

This section is empty.

Functions

func CountGzAndZodiac

func CountGzAndZodiac(year int) (gz string, zodiac string)

CountGzAndZodiac Calculate the Heavenly Stems, Earthly Branches, and Zodiac Phases Based on the Year reference link: http://www.360doc.com/content/19/0131/15/30390538_812371769.shtml

func DzList

func DzList() []string

func GzList

func GzList() []string

GzList List of stems and branches obtained through pairing with heavenly stems and earthly branches

func PnPart

func PnPart(def string) []string

PnPart parse PN(Positive Negative)-parts by define string

func TgList

func TgList() []string

func TimeParse

func TimeParse(tm time.Time)

TimeParse @todo try and need todo, let make it.

func ZodiacList

func ZodiacList() []string

Types

type DzTime

type DzTime struct {
	Name      string // dizhi name like '子'
	Alias     string
	Range     [2]int
	Month     int
	MonthName string
	Zodiac    string
}

func (*DzTime) String

func (c *DzTime) String() string

Jump to

Keyboard shortcuts

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