shime/taw

Time distance in words

Opened this issue · 3 comments

The way taw works is it converts the given time to a time delta and then formats the delta.

Sometimes the application has a delta already, it's redundant to create a time from it to give to taw for it to calculate the delta back and format.

Thoughts on adding a time_distance_in_words method for this use case?

shime commented

I'd prefer a keyword argument named delta for this, on the already available method Taw.time_ago_in_words.

Would you be interested in implementing this?

It works I suppose but is rather verbose:

Taw.time_ago_in_words(120, delta: true)

vs

Taw.time_distance_in_words(120)

Since Taw has its own namespace what is the concern with adding a separate method?

shime commented

It seems related to the feature already provided with the .time_ago_in_words.