pqina / flip

⏳ The online version of the classic flip clock
https://pqina.nl/flip/
MIT License
892 stars 87 forks source link

Schedule "every 2 days" or "every 48 hours" #32

Closed marcdomancie closed 2 years ago

marcdomancie commented 3 years ago

Hello there,

I am wanting to achieve an evergreen countdown timer that repeats itself every 2 days or 48 hours with tick.count.schedule()

I have tried both:

But I don't think that the logical English syntax is supported.

How can I achieve this?

rikschennink commented 3 years ago

I don't think that's currently possible.

marcdomancie commented 3 years ago

I have a sample working thanks!

// Resets Monday, Wednesday, Friday, Sunday // Except Monday is a 24 hour countdown and not 48 hour

Tick.count.schedule('every monday at 23:59:59, every wednesday at 23:59:59, every friday at 23:59:59, every sunday at 23:59:59',{ timezone: '+10:00' }).onupdate = function(value) { tick.value = value; }