Raku / whateverable

🤖 Different IRC bots that operate on a bunch of prebuilt Rakudo versions
https://gist.github.com/Whateverable
GNU Affero General Public License v3.0
18 stars 14 forks source link

Answer “how old are you” and “age” queries #363

Open taboege opened 5 years ago

taboege commented 5 years ago

The script creation date is obtained from the git history. Resolves #361.

taboege commented 5 years ago

I'm not completely satisfied with how the question is answered yet in that a creation date is not a good answer for an age query. I'd like to have something like "$y years and $d days ago", but I got lost a little in (leap) date arithmetic. Sadly using a Duration will be inaccurate as a difference of 366 days might be "1 year" or "1 year and 1 day", depending on what the two dates were...

But I want to ask first: Do you agree that an answer formatted like above is more desirable than the creation timestamp?

AlexDaniel commented 5 years ago

There's a time-left sub, maybe it can be extended/repurposed to talk about dates in the past? Yes, I think “X years, etc.” is a better format. Also if it happens that it prints “…, Z seconds” too, I totally don't mind :joy:

Sadly using a Duration will be inaccurate

First I was a bit confused, now I understand that you're totally right… hmm… Is there any module in the ecosystem? Generally I don't want any more dependencies in whateverable, there are already too many, but I can do an exception… :)

AlexDaniel commented 5 years ago

Any updates? :) I'd love to merge this.