SolarUtil

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package SolarUtil @Title SolarUtil @Description 阳历工具 @Author 6tail

Index

Constants

This section is empty.

Variables

View Source
var DAYS_OF_MONTH = []int{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
View Source
var FESTIVAL = map[string]string{"1-1": "元旦节", "2-14": "情人节", "3-8": "妇女节", "3-12": "植树节", "3-15": "消费者权益日", "4-1": "愚人节", "5-1": "劳动节", "5-4": "青年节", "6-1": "儿童节", "7-1": "建党节", "8-1": "建军节", "9-10": "教师节", "10-1": "国庆节", "10-31": "万圣节前夜", "11-1": "万圣节", "12-24": "平安夜", "12-25": "圣诞节"}
View Source
var OTHER_FESTIVAL = map[string][]string{}/* 137 elements not displayed */
View Source
var WEEK = []string{"日", "一", "二", "三", "四", "五", "六"}
View Source
var WEEK_FESTIVAL = map[string]string{
	"3-0-1":  "全国中小学生安全教育日",
	"5-2-0":  "母亲节",
	"5-3-0":  "全国助残日",
	"6-3-0":  "父亲节",
	"9-3-6":  "全民国防教育日",
	"10-1-1": "世界住房日",
	"11-4-4": "感恩节",
}
View Source
var XINGZUO = []string{"白羊", "金牛", "双子", "巨蟹", "狮子", "处女", "天秤", "天蝎", "射手", "摩羯", "水瓶", "双鱼"}

Functions

func GetDaysBetween added in v1.3.0

func GetDaysBetween(ay int, am int, ad int, by int, bm int, bd int) int

func GetDaysInYear added in v1.2.13

func GetDaysInYear(year int, month int, day int) int

func GetDaysOfMonth

func GetDaysOfMonth(year int, month int) int

func GetDaysOfYear added in v1.2.13

func GetDaysOfYear(year int) int

func GetJulianDay added in v1.3.7

func GetJulianDay(year int, month int, day int, hour int, minute int, second int) float64

func GetWeek added in v1.3.0

func GetWeek(year int, month int, day int) int

func GetWeeksOfMonth

func GetWeeksOfMonth(year int, month int, start int) int

func IsBefore added in v1.3.0

func IsBefore(ay int, am int, ad int, ah int, ai int, as int, by int, bm int, bd int, bh int, bi int, bs int) bool

func IsLeapYear

func IsLeapYear(year int) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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