Skip to content

[feat] countdown #47

@1000i100

Description

@1000i100

I would love to be able to generate countdown like this :
https://badgers.space/countdown/myLabel/2024-12-25 show a badge like this : [ myLabel | 9 months 3 days ]
https://badgers.space/countdown/myLabel/2024-12-25T12:00:00Z show a badge like this : [ myLabel | 9 months 3 days ] but if less than a month, it will be [ myLabel | 3 days 9 hours ] and less than a day [ myLabel | 6 hours 35 minutes ]
https://badgers.space/countdown/myLabel/2024-12-25/Md like [ myLabel | 9 months 3 days ] but will switch from [ myLabel | 1 day ] to [ myLabel | today ] then [ myLabel | ended ] without going down to hours or minute, because only M month and d day are given in pattern.
https://badgers.space/countdown/myLabel/2024-12-25/M will show : [ myLabel | 9 months ] then under a month : [ myLabel | this month ]
https://badgers.space/countdown/myLabel/2024-12-25/d will show : [ myLabel | 153 days ]
https://badgers.space/countdown/myLabel/2024-12-25T12:00:00/1Mdhm will show : [ myLabel | 9 months ] then under a month [ myLabel | 30 days ] down to minutes, but only on time unit at a time.
https://badgers.space/countdown/myLabel/2024-12-25T12:00:00/2Mdhm same than before but with to at a time (the default) : [ myLabel | 9 months 3 days ]
https://badgers.space/countdown/myLabel/2024-12-25T12:00:00/2Mdhm/fr same but in french : [ myLabel | 9 mois 3 jours ]

And why not with 2 dates for event :

https://badgers.space/event-countdown/myLabel/now/past/2024-12-25T12:00:00_2025-01-01T00:00:00 will show : [ myLabel | 9 months 3 days ] before the first date, then between the to dates : [ myLabel | now ] and after : [ myLabel | past ] and if you change past in the url by finished it will show : [ myLabel | finished ]

How about it ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions