MCPcopy Index your code
hub / github.com/6tail/tyme4ts

github.com/6tail/tyme4ts @v1.5.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.5.2 ↗ · + Follow
1,514 symbols 4,542 edges 49 files 10 documented · 1% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Tyme License

Tyme是一个非常强大的日历工具库,可以看作 Lunar 的升级版,拥有更优的设计和扩展性,支持公历、农历、藏历、回历、星座、干支、生肖、节气、月相、法定假日等。

示例

// install
npm init -y
npm i typescript -D
npm i ts-node -D
npm i tyme4ts

// test.ts
import {SolarDay} from 'tyme4ts';

const solar: SolarDay = SolarDay.fromYmd(1986, 5, 29);

// 1986年5月29日
console.log(solar.toString());

// 农历丙寅年四月廿一
console.log(solar.getLunarDay().toString());

// 第十七饶迥火虎年四月廿一
console.log(solar.getRabByungDay().toString());

// 1406年赖买丹月20日
console.log(solar.getHijriDay().toString());

// run
ts-node test.ts

文档

请移步至 https://6tail.cn/tyme.html

Star History

Star History Chart

致谢

  1. 感谢许剑伟老师分享的寿星天文历,本项目节气算法引自 https://github.com/sxwnl/sxwnl
  2. 感谢stonelf,本项目藏历数据引自 https://github.com/stonelf/zangli

Extension points exported contracts — how you extend this code

Culture (Interface)
(no doc) [19 implementers]
lib/index.ts
Tyme (Interface)
(no doc) [72 implementers]
lib/index.ts
EightCharProvider (Interface)
(no doc) [7 implementers]
lib/index.ts
ChildLimitProvider (Interface)
(no doc) [4 implementers]
lib/index.ts

Core symbols most depended-on inside this repo

getName
called by 339
lib/index.ts
toString
called by 305
lib/index.ts
fromYmd
called by 250
lib/index.ts
fromIndex
called by 206
lib/index.ts
next
called by 189
lib/index.ts
fromName
called by 172
lib/index.ts
getIndex
called by 120
lib/index.ts
fromYm
called by 101
lib/index.ts

Shape

Method 1,193
Class 285
Function 27
Enum 5
Interface 4

Languages

TypeScript100%

Modules by API surface

lib/index.ts1,060 symbols
test/LunarMonthTest.ts46 symbols
test/EightCharTest.ts41 symbols
test/LunarDayTest.ts31 symbols
test/LunarYearTest.ts25 symbols
test/WeekTest.ts24 symbols
test/SolarDayTest.ts16 symbols
test/NineStarTest.ts15 symbols
test/PhaseTest.ts14 symbols
test/DogDayTest.ts13 symbols
test/RabByungDayTest.ts11 symbols
test/SixStarTest.ts10 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

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

⬇ download graph artifact