Chinese Zodiac Time for Emacs

In the spirit of Chinese New Year, I hacked up a small extension for Emacs to render the current time of day using emoji and Chinese characters:

Various screenshots of Emacs showing the time displayed with Chinese characters and emoji.

Various configurations for your mode line.

It’s just a silly project that I’ll consider a success if it puts a smile on someone’s face, but it is loosely based on a system used to measure time in the Ming dynasty which divided the day into 12 equal periods (時1), named after the 12 earthly branches (地支).

Because the animals of the Chinese zodiac map 1-to-1 with the earthly branches, it is equally possible to indicate the time with the zodiac animals!

Chart of correspondence between the earthly branches, zodiac animals, and times of day from Wikipedia. Apologies on this being in Spanish.

Chart of correspondence between the earthly branches, zodiac animals, and times of day from Wikipedia. Apologies on this being in Spanish.

Given that a modern user probably wants to know which of our 24 hours they’re in, rather than which two hour period (時), I decided to differentiate the two halves as either 小 (small) or 大 (large).

Hence, in the image above showing the time as 「大🐲 四十二分」, the current time is 8:42am, by our modern reckoning (7:42am would be the little dragon!).

I won’t go into a ton of detail here because I explain it in some detail on the project’s GitHub page.

The most amusing part of the project was, perhaps, deciding exactly which emoji to use! In the end, I implemented two sets of emoji you can choose from:


Rather disappointing that we don’t quite have a complete set of animal faces. At least not in Apple’s emoji.

If you’re wondering why I chose the COW (🐄) emoji in the second set rather than the OX (🐂), it’s because it looked too similar to the neighboring TIGER (🐅), making it easy to confuse the time.

If you don’t like my choices, the library also makes it extremely easy to bring your own set of emoji, so you can make your own decisions between:

  • RAT (🐀), MOUSE (🐁), and MOUSE FACE (🐭)
  • SHEEP (🐑), GOAT (🐐), and RAM (🐏)
  • HORSE (🐎) and HORSE FACE (🐴)
  • CHICKEN (🐔) and ROOSTER (🐓)
  • Or maybe even pretend FROG (🐸) is a snake face
  • Or spice up your horse with UNICORN (🦄)

Clearly the sky’s the limit.

For Chinese learners or traditionalists, it can also display the time with:

  • Traditional characters: 「大龍 四十二分」2
  • Simplified characters: 「大龙 四十二分」
  • Or earthly branches: 「辰正 四十二分」

(n.b. the earthly branches are displayed using the proper, traditional system of 初 and 正 suffixes, not my invented prefixes for animals.)

It’s a lot of fun telling time with cute animals, and might even help you learn a few things if you’re a beginner in Chinese, so check it out on GitHub!

龍年快樂!恭喜發財! 🐉🧧

  1. Students of the Chinese language may find it interesting to know that these two hour periods are the reason we call (single) hours 時 in modern Chinese (I know I did!). ↩︎

  2. It’s not 100% clear to me if these characters will render the same regardless of locale, so I apologize if they do not appear as I have described—I’m still trying to get my head around CJK unification in Unicode. ↩︎