shields icon indicating copy to clipboard operation
shields copied to clipboard

Customize format for last-commit badge

Open chinesedfan opened this issue 5 years ago • 4 comments

:clipboard: Description

Can we add a query parameter, say f which will send to moment.format(f), to control the date format? Maybe not only last-commit badge, but also other date related badges.

My real use-case is a little special. There is a repository, Bogdanp/awesome-advent-of-code, which collects solutions for a programming puzzle activity. Because the activity is only hold in December every year. It's not easy to distinguish last-commit date among those solution repositories.

chinesedfan avatar Jan 12 '19 11:01 chinesedfan

Hi! Thanks for the suggestion.

I think the default format of the last commit + relative date badges could be improved. I've used them a lot in my own projects and they don't seem nearly as useful as it could be.

I'd be happy to change the default to e.g. 3 weeks ago, 4 weeks ago, up to, say, 16 weeks ago, and then transitioning to 4 months ago, etc. I really like having good default, and think we're missing the mark on this one.

Another option that would give you total control is the Endpoint badge: #2473.

What do you think?

paulmelnikow avatar Jan 12 '19 16:01 paulmelnikow

@paulmelnikow Thanks for your link. I learned the new endpoint badge, as well as dynamic badge. They are really powerful and should be able to satisfy my requirement.

I am fine with the default format of last-commit badge. If you want to improve it with more precise names, that can be better. So close this issue or leave it to remind someone else is both OK.

chinesedfan avatar Jan 13 '19 06:01 chinesedfan

relative date badges

should always be absolute date, to get a timeless view (archive friendly) the relative date can still be visualized as color (green - yellow - red)

milahu avatar Nov 06 '21 07:11 milahu