whateverable icon indicating copy to clipboard operation
whateverable copied to clipboard

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

Open taboege opened this issue 5 years ago • 3 comments

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

taboege avatar Sep 18 '19 05:09 taboege

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?

taboege avatar Sep 18 '19 05:09 taboege

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 avatar Sep 18 '19 05:09 AlexDaniel

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

AlexDaniel avatar Nov 23 '19 14:11 AlexDaniel