MCPcopy Index your code
hub / github.com/6tail/lunar-go

github.com/6tail/lunar-go @v1.4.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.4.6 ↗ · + Follow
1,017 symbols 3,809 edges 51 files 140 documented · 14% updated 8mo agov1.4.6 · 2025-11-05★ 3297 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

lunar License

lunar is a calendar library for Solar and Chinese Lunar.

Support since go1.14

简体中文

Example

package main

import (
    "fmt"
    "github.com/6tail/lunar-go/calendar"
)

func main() {
    lunar := calendar.NewLunarFromYmd(1986,4,21)
    fmt.Println(lunar.ToFullString())
    fmt.Println(lunar.GetSolar().ToFullString())
}

Output:

一九八六年四月廿一 丙寅(虎)年 癸巳(蛇)月 癸酉(鸡)日 子(鼠)时 纳音[炉中火 长流水 剑锋金 桑柘木] 星期四 北方玄武 星宿[斗木獬](吉) 彭祖百忌[癸不词讼理弱敌强 酉不会客醉坐颠狂] 喜神方位[巽](东南) 阳贵神方位[巽](东南) 阴贵神方位[震](正东) 福神方位[兑](正西) 财神方位[离](正南) 冲[(丁卯)兔] 煞[东]
1986-05-29 00:00:00 星期四 双子座

Documentation

Please visit https://6tail.cn/calendar/api.html

Star History

Star History Chart

Core symbols most depended-on inside this repo

NewSolarFromYmd
called by 133
calendar/Solar.go
GetLunar
called by 93
calendar/Tao.go
NewSolar
called by 60
calendar/Solar.go
ToYmd
called by 60
calendar/Solar.go
ToFullString
called by 45
calendar/Fu.go
NextDay
called by 42
calendar/Solar.go
GetLunar
called by 41
calendar/Solar.go
Next
called by 40
calendar/Solar.go

Shape

Method 624
Function 368
Struct 25

Languages

Go100%

Modules by API surface

calendar/Lunar.go247 symbols
calendar/EightChar.go64 symbols
calendar/LunarYear.go52 symbols
test/Lunar_test.go47 symbols
calendar/LunarTime.go39 symbols
calendar/Solar.go37 symbols
calendar/LunarMonth.go31 symbols
calendar/Foto.go29 symbols
test/XingZuo_test.go24 symbols
test/SolarWeek_test.go24 symbols
calendar/Tao.go24 symbols
ShouXingUtil/ShouXingUtil.go24 symbols

For agents

$ claude mcp add lunar-go \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page