Liuyao term

Heavenly Stems — Tian Gan (天干)

The ten Heavenly Stems pair with branches in the sixty-day cycle. Yarrow uses the day stem for Six Spirits and, with the day branch, xunkong.

The ten stems

Jia 甲 and Yi 乙 are Yang/Yin Wood; Bing 丙 and Ding 丁 are Yang/Yin Fire; Wu 戊 and Ji 己 are Yang/Yin Earth; Geng 庚 and Xin 辛 are Yang/Yin Metal; Ren 壬 and Gui 癸 are Yang/Yin Water. Each pair shares an element but differs in polarity.

Traditional Najia systems also associate stems with trigrams, for example Qian’s inner Jia and outer Ren. That does not mean a Qian line’s element is Wood or Water because of its stem. In Yarrow, line elements are derived from the assigned Earthly Branch.

The role of the day stem in this implementation

Yarrow’s basic ChartData stores the day stem; it does not attach a heavenly-stem field to every line. The day stem sets the starting Six Spirit: Jia/Yi → Azure Dragon; Bing/Ding → Vermilion Bird; Wu → Gou Chen; Ji → Flying Serpent; Geng/Xin → White Tiger; Ren/Gui → Black Tortoise. The six labels then rotate through the positions from bottom to top.

The day stem and day branch together locate the ten-day xun and its two void branches. These are rule-based calendar calculations. Six Spirits are symbolic labels, not claims that spirits have been detected or that a health or safety outcome is known.

Frequently asked questions

Does Yarrow show a stem on each line?

The current basic chart stores the day stem, but each line stores a branch, element, relative, and spirit rather than a per-line stem field.

Why keep both day stem and day branch?

The day stem sets the Six Spirit sequence; together with the day branch it identifies the ten-day xun used for xunkong.

Scope, sources, and limits

These definitions describe Yarrow’s current Najia, eight-palace, five-phase, Six Spirit, and xunkong rules, not every school. Calendar fields come from lunar-javascript. Traditional meanings are symbolic interpretations, not scientific prediction evidence or medical, legal, or financial advice.

Calendar library documentation: lunar-javascript

Content updated: 27 October 2026. Responsibility and corrections: editorial policy