You wake up to find that something has gone horribly wrong! Your time machine has malfunctioned and you are lost sometime between June 2022 and October 1991.
You check the computer that you keep on the desk to see what time it is, but alas the positron interference from your quantum undetangler has fried the system clock, the internet, and several other sensible ways to use a computer to check the time!
You wrack your brain, for some way to figure out the time. It's too dangerous to go outside... you haven't changed your decor in decades .. Aha! You've got it! You know for sure that over the last 31 years you've always kept a perfectly updated version of your favorite programming language on this very computer! You're still a bit loopy from the decompactification so you can't remember some things, but you do retain your perfect knowledge of the history of the Unicode standard.
Your task is to write a computer program which when run will output the approximate date or date range based on the implementation of Unicode available.
For example, since
Ogham Letter Eadhadh) was added to Unicode in version 3.0 the following Haskell program determines if we are before the release of 3.0 in September 1999 or after.
import Data.Char main = putStrLn $ if generalCategory 'ᚓ' == OtherLetter then "September 1999-present" else "October 1991-August 1999"
You may assume either
- Your programming language has an idealized version of its Unicode handling library that has always implemented the current standard. (Even for dates before the invention of your language)
- Your programming language has the actual up-to-date version of its Unicode library that would be available at the particular date, bugs, and all.
To keep things neat and tidy do not mix and match. If you exploit a bug you're on track two, if you use anachronistic language features you're on track one.
You should not use any language features other than the library to determine the date. For example, you can't just pull the language version string or check if a certain function exists. You must use calls to the Unicode handling library.
This is a popularity-contest so answers will be scored by their vote counts.
I encourage voters to consider the following criteria when judging programs:
- Granularity. Vote-up programs that can distinguish the date to high levels of detail.
- Conciseness. Not exactly code-golf, but I encourage you to vote up programs that determine the date in fewer checks.
- Cleverness. No matter what I say people are going to vote up cleverer answers, but it's worth mentioning. I encourage you to vote up answers that use obscure Unicode trivia, exploit strange edge cases, etc.