skip to content
sys.name
vvhybe_os 26.10
status
200 building papyrus
user
vvhybe (yassine bouba)

cat universal-age/

12 / 19

Universal Age

Your age on every planet of the solar system, in English, French and Arabic. Plus a Python CLI.

year
2022
access
-r--r--r-- (archived, read-only)
Universal Age, screenshot

// overview

Your age on every planet of the solar system, in English, French and Arabic. Plus a Python CLI.

// one formula, nine worlds

Each body's orbital period sits in a JSON file, in Earth days. Your age on Earth is the days you've lived over 365.25625; anywhere else, that divided by the planet's year in Earth years. Pluto gets a slide too.

// three languages, one mirrored

A small dictionary holds the labels in English, French and Arabic, the language button cycles through them, and Arabic mirrors the info panel.

// the same idea in Python

The CLI wraps the maths in a class and reads a birthdate day-first or year-first, with almost any separator; a bare year counts as the first of January.

// stack

  • react
  • i18n
  • python

// links