1.0.5 • Published 6 years ago

bdo-clock v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

bdo-clock

A JavaScript Library to convert real time into Black Desert Online in game clock.

Install

npm install bdo-clock --save

Usage

const bdoClock = require('bdo-clock');

console.log(`Current in game time is ${bdoClock()}`);

Custom Date

This library uses moment.js, so it takes any parameter take moment() can take.

bdoClock('2018-06-08T20:20Z').toString(); // "7:00 a.m."

Find out Day/Night Time

bdoClock('2018-06-08T20:20Z').isDaytime; // true

Find next time day change to night or vice versa

bdoClock('2018-06-08T20:20Z').nextDayNightChange.toISOString(); // "2018-06-08T23:40:00.000Z"

Find out time elapsed since 0 a.m. in game

See moment.Durations on how to use the returned duration object

bdoClock('2018-06-08T20:20Z').timeElapsed.hours(); // 7

License

bdo-clock is freely distributable under the terms of the MIT license.

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago