doomsday-clock

Get the time until midnight according to the Doomsday Clock.

Usage no npm install needed!

<script type="module">
  import doomsdayClock from 'https://cdn.skypack.dev/doomsday-clock';
</script>

README

doomsday-clock Travis CI Build Status

Get the time until midnight according to the Doomsday Clock.

NPM Badge

Install

npm install doomsday-clock

Usage

const doomsdayClock = require("doomsday-clock");

(async () => {
    const { seconds } = await doomsdayClock();
    console.log(`There are ${seconds} seconds 'till midnight!`);
})();

API

doomsdayClock()

Return data

seconds

Type: number

The amount of seconds left.

source

Type: string

The statement that the minutes were sourced from.

time

Type: string

The amount of time left as represented as HH:mm:ss A.

Migrating from v1

  • Node.js 10 or later is now required.
  • Support for callbacks have been removed.
  • The seconds value is now provided instead of minutes.