Western & Eastern Zodiac Terms
@tempo-kit/plugin-cultural ships two tree-shakeable zodiac Terms that integrate directly with Tempo's shorthand navigation, formatting tokens, and .span progress windows.
Western Tropical Zodiac (ZodiacTerm)
- Subpath:
@tempo-kit/plugin-cultural/zodiac - Keys & Aliases:
t.term.zdc,t.term.sunSign,t.term.starSign(shorthand key) ·t.term.zodiac(fullWesternZodiacScope) - Static Discovery:
ZODIAC_KEYS(frozen 12-sign array:'Aries'→'Pisces')
typescript
import { Tempo } from 'tempo-kit';
import { ZodiacTerm } from '@tempo-kit/plugin-cultural/zodiac';
Tempo.use(ZodiacTerm);
const t = new Tempo('2026-04-05T12:00:00Z');
console.log(t.term.zdc); // 'Aries'
console.log(t.term.zodiac.symbol); // 'Ram'
console.log(t.term.zodiac.emoji); // '♈'
console.log(t.format('{#zdc.emoji} {#zdc}')); // '♈ Aries'
console.log(t.set('#zdc.>taurus').format('{yyyy}-{mm}-{dd}')); // '2026-04-20'WesternZodiacScope Properties
| Property | Type | Description |
|---|---|---|
key | WesternZodiacKey | Canonical English sign name ('Aries' .. 'Pisces'). |
symbol | string | Traditional symbol name (e.g. 'Ram', 'Bull', 'Scales'). |
emoji | string | Unicode zodiac symbol (e.g. '♈'). |
trait | string | Concise traditional personality summary. |
keys | readonly WesternZodiacKey[] | Frozen reference to ZODIAC_KEYS. |
span | TermSpan | Closed [start, end) span for the active sign window. |
East Asian Sexagenary Zodiac (EasternTerm)
- Subpath:
@tempo-kit/plugin-cultural/eastern - Keys & Aliases:
t.term.sign,t.term.lunarSign,t.term.eastern(shorthand key) ·t.term.shengxiao(fullEasternZodiacScope) - Static Discovery:
EASTERN_ANIMAL_KEYS(frozen 16-entry array covering all regional variants)
NOTE
EasternTerm defaults to Gregorian calendar year boundaries ({yyyy}-01-01 → next year's 01-01). If you need transitions on the exact Chinese New Year (M01 day 1), register createEasternTerm({ boundary: 'lunisolar' }).
Lunisolar Year Boundaries (createEasternTerm)
Use createEasternTerm({ boundary: 'lunisolar' }) to resolve the zodiac sign and .span against Temporal's 'chinese' lunisolar calendar:
typescript
import { Tempo } from 'tempo-kit';
import { createEasternTerm } from '@tempo-kit/plugin-cultural/eastern';
Tempo.use(createEasternTerm({ boundary: 'lunisolar' }));
// Feb 16, 2026 is the last day of the lunar Year of the Wood Snake (2025)
const eve = new Tempo('2026-02-16T12:00:00Z');
console.log(eve.term.sign, eve.term.shengxiao.element); // 'Snake' 'Wood'
// Feb 17, 2026 is Chinese New Year — Year of the Fire Horse (2026)
const cny = new Tempo('2026-02-17T12:00:00Z');
console.log(cny.term.sign, cny.term.shengxiao.element); // 'Horse' 'Fire'
console.log(cny.term.shengxiao.span.start.format('{yyyy}-{mm}-{dd}')); // '2026-02-17'
console.log(cny.term.shengxiao.span.end.format('{yyyy}-{mm}-{dd}')); // '2027-02-06' (or '2027-02-07' on ICU4C polyfill backends; 2027 new moon falls at 23:56 CST)Regional Variants (cn, jp, kr, vn)
When a Tempo instance is configured with a regional locale (zh-*, ja-*, ko-*, vi-*), t.term.sign and t.term.shengxiao.emoji adapt automatically:
Canonical (cn) | Japan (ja-*) | Korea (ko-*) | Vietnam (vi-*) |
|---|---|---|---|
Ox (🐂) | Ox (🐂) | Ox (🐂) | Water Buffalo (🐃) |
Rabbit (🐇) | Rabbit (🐇) | Rabbit (🐇) | Cat (🐈) |
Goat (🐐) | Sheep (🐑) | Sheep (🐑) | Goat (🐐) |
Pig (🐖) | Wild Boar (🐗) | Pig (🐖) | Pig (🐖) |
typescript
import { Tempo } from 'tempo-kit';
import { EasternTerm } from '@tempo-kit/plugin-cultural/eastern';
Tempo.use(EasternTerm);
const t = new Tempo('2026-06-01T12:00:00Z');
console.log(t.term.sign); // 'Horse'
console.log(t.term.shengxiao.element); // 'Fire'
console.log(t.term.shengxiao.yinYang); // 'Yang'
const vn = new Tempo('2023-05-01T12:00:00Z', { locale: 'vi-VN' });
console.log(vn.term.sign, vn.term.shengxiao.emoji); // 'Cat 🐈'