swatch_time
v1.0.3
Published
a js library for converting ISO-8601 to swatch .beat time
Downloads
7
Readme
swatch_time
A JS library to convert ISO-8601 to Swatch .beat Internet Time
This library is designed to convert from ISO-8601 to Swatch .beat Internet time. Why? I don't know.
Install
NPM it up!
$ npm install --save swatch_timeUsage
This takes an ISO-8601 timestamp string and turns it into a Swatch .beat Internet timestamp.
const getBeatTime = require('swatch_time');
console.log(getBeatTime("1970-01-01T00:00:00Z")); // should output @41.67
console.log(getBeatTime("1970-01-01T00:00:00Z", false)); // should output 41.67
console.log(getBeatTime("1970-01-01T00:00:00Z", false, false, false)); // should output 41
console.log(getBeatTime("1970-01-01T00:00:00Z", false, true, true)); // should output [email protected]