PButcher / flipdown

⏰ A lightweight and performant flip styled countdown clock
https://pbutcher.uk/flipdown/
MIT License
393 stars 122 forks source link

Add Countup from a specific date. #27

Open sw82 opened 4 years ago

PButcher commented 4 years ago

So this would be a feature that shows the time elapsed since a specific date?

sw82 commented 4 years ago

Yes.

ribeiroeder commented 4 years ago
    document.addEventListener('DOMContentLoaded', function() {

      var getDaysFuture = new Date('2020-07-28T00:00:00').getTime() / 1000;

      // Set up FlipDown
      var flipdown = new FlipDown(getDaysFuture).start()

        // Do something when the countdown ends
        .ifEnded(function() {
          console.log('The countdown has ended!');
        });

    });