This is VERY hackish, it was literally a "gee wouldn't it be cool if it could do this? *whip out editor and start coding like a madman*" things. But it works (for now). Needs a lot of future proofing (and general rewriting) though.
The "how many gems will you have on date X?" part works. The "when will you have N number of gems?" is still to be done.