Shields: Request: 'Time passed since' shield

Created on 18 Jul 2016  路  4Comments  路  Source: badges/shields

It would be awesome to have a way to get how much time is passed since argument, for instance

[age | 1 hour]  
[age | 3 years]

or

[published before | 1 minute]
[last build before | 1 day]

URL Example:

https://img.shields.io/badge/age-2016_07_18_T_15_05_30-red.svg
good first issue service-badge

Most helpful comment

@RedSparr0w @chris48s I would like to ask if this issue need any PR and my suggestion for the endpoint for this issue is
https://img.shields.io/badge/date/<SUBJECT>-<TIMESTAMP>-<COLOR>.svg

Example
https://img.shields.io/badge/date/christmas-1545696000-red.svg

I will be using moment which is already a dependency.
If the timestamp is 2 minutes before now, return 2 minutes ago.
If the timestamp is 2 minutes after now, return in 2 minutes.

All 4 comments

i'm looking for similar behaviors.
Github badge for :

  • time since last commit (how alive/dynamic is the project)
  • time since first commit (how old/mature is the project)

@RedSparr0w @chris48s I would like to ask if this issue need any PR and my suggestion for the endpoint for this issue is
https://img.shields.io/badge/date/<SUBJECT>-<TIMESTAMP>-<COLOR>.svg

Example
https://img.shields.io/badge/date/christmas-1545696000-red.svg

I will be using moment which is already a dependency.
If the timestamp is 2 minutes before now, return 2 minutes ago.
If the timestamp is 2 minutes after now, return in 2 minutes.

Tagging @paulmelnikow as well

Hi, yes, and thanks for taking this on! What you鈥檙e suggesting sounds good.

We鈥檝e been moving away from APIs with dashes like the static badge, so let鈥檚 model on the dynamic badge instead:

https://img.shields.io/date/1545696000.svg?label=christmas&colorB=red

Was this page helpful?
0 / 5 - 0 ratings

Related issues

irgolic picture irgolic  路  3Comments

kerolloz picture kerolloz  路  3Comments

lukeeey picture lukeeey  路  3Comments

paulmelnikow picture paulmelnikow  路  3Comments

korenyoni picture korenyoni  路  3Comments