ksecs

0.1.7 • Public • Published

ksecs

Library for dealing with time in kiloseconds.

Usage

get

Get the number of kiloseconds into the given day

Aliases:

  • toKSecs
  • toKsecs
  • toKs
  • convert

Parameters:

  • date: Date to get kiloseconds from

Example:

> ksecs.toKSecs(new Date("Apr 20 2017 16:20:42 GMT-0800"));
62.442

now

Get the current kiloseconds into the current day

Aliases:

  • currentTime

Example:

> ksecs.now();
63.331

fromEpoch

Get kiloseconds into a day from an epoch time

Parameters:

  • milliseconds: Epoch time

Example:

> ksecs.fromEpoch(1234567890);
82.567
Minutes Seconds Kiloseconds
1 minute 60 s 0.06 ks
5 minutes 300 s 0.3 ks
10 minutes 600 s 0.6 ks
15 minutes 900 s 0.9 ks
16 minutes 40 seconds 1000 s 1 ks
20 minutes 1200 s 1.2 ks
25 minutes 1500 s 1.5 ks
30 minutes 1800 s 1.8 ks
33 minutes 20 seconds 2000 s 2 ks
35 minutes 2100 s 2.1 ks
40 minutes 2400 s 2.4 ks
45 minutes 2700 s 2.7 ks
50 minutes 3000 s 3 ks
55 minutes 3300 s 3.3 ks
60 minutes 3600 s 3.6 ks
1 hour, 23 minutes, 20 seconds 5000 s 5 ks
6 hours 21600 s 21.6 ks
12 hours 43200 s 43.2 ks
18 hours 64800 s 64.8 ks
24 hours 86400 s 86.4 ks

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.73latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.73
0.1.60
0.1.50
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00

Package Sidebar

Install

npm i ksecs

Weekly Downloads

0

Version

0.1.7

License

WTFPL

Last publish

Collaborators

  • tranquilmarmot