taian
A Rust library and CLI tool for calculating Rokuyo (六曜), a traditional Japanese calendar system.
Rokuyo is a calendar annotation system that originated in China and is widely used in Japan. It consists of six days: Sensho, Tomobiki, Senbu, Butsumetsu, Taian, and Shakku, calculated from the lunar calendar's month and day.
Features
- Accurate lunar calendar calculation (using
chinese-lunisolar-calendar) - Provides both library and CLI
- Simple and easy-to-use API
Installation
As a Library
[]
= "0.1"
As a CLI Tool
Usage
As a Library
use ;
use NaiveDate;
As a CLI Tool
# Display today's Rokuyo
# Display Rokuyo for a specific date
About Rokuyo
| Rokuyo | Reading | Meaning |
|---|---|---|
| 先勝 (Sensho) | senshou/senkachi | Auspicious in the morning, inauspicious in the afternoon |
| 友引 (Tomobiki) | tomobiki | Auspicious in the morning and evening, inauspicious at noon. Day to avoid funerals |
| 先負 (Senbu) | senbu/sakimake | Inauspicious in the morning, auspicious in the afternoon |
| 仏滅 (Butsumetsu) | butsumetsu | Inauspicious all day |
| 大安 (Taian) | taian | Auspicious all day |
| 赤口 (Shakku) | shakkou/shakku | Auspicious only at noon, inauspicious at other times |
Calculation Method
Rokuyo is calculated from the lunar calendar's month and day:
-
The Rokuyo for the 1st day of each lunar month is fixed:
- Months 1 & 7: Sensho
- Months 2 & 8: Tomobiki
- Months 3 & 9: Senbu
- Months 4 & 10: Butsumetsu
- Months 5 & 11: Taian
- Months 6 & 12: Shakku
-
After that, it cycles through the sequence: Sensho → Tomobiki → Senbu → Butsumetsu → Taian → Shakku
License
MIT License - See LICENSE for details.
References
- Rokuyo Calculation Method - Musashiya (Japanese)