A millennia-old calendar system