@blinkk/degu
    Preparing search index...

    Function countdown

    • Use to calculate the countdown to a given time. Note that the currentTime and endTime should both be in the same local timezone.

      Returns an object with days, hours, minutes, seconds.

      const now = new Date();
      const endTime = new Date('2021-06-20 03:34:00 UTC');
      const countDown = time.countdown(now, endTime);


      countdown.days; // the number of days
      countdown.hours; // the number of hours
      countdown.minutes; // the number of minutes
      countdown.seconds; // the number of seconds

      Parameters

      • currentTime: Date
      • endTime: Date

      Returns Object