New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cannonian

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cannonian - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

11

cannonianjs-latest.js
/**
* Cannonian.js
* Made by Jack Cannon - c.annon.co.uk
* v1.1.1
* v1.1.2
*/

@@ -14,4 +14,4 @@

var MS_HOU = (1000 * 60) * 60; // milliseconds in an hour
var MS_MIN = 1000 * 60; // milliseconds in a day
var MS_SEC = 1000; // milliseconds in a day
var MS_MIN = 1000 * 60; // milliseconds in a minute
var MS_SEC = 1000; // milliseconds in a second

@@ -284,4 +284,4 @@

cann.hour = Math.floor(decimal * 100);
cann.minu = Math.floor((decimal * 100 * 10) % cann.hour);
cann.cent = Math.floor((decimal * 100 * 10 * 100) % ((cann.hour * 10) + cann.minu));
cann.minu = (cann.hour === 0) ? Math.floor((decimal * 100 * 10)) : Math.floor((decimal * 100 * 10) % cann.hour);
cann.cent = (cann.hour + cann.minu === 0) ? Math.floor((decimal * 100 * 10 * 100)) : Math.floor((decimal * 100 * 10 * 100) % ((cann.hour * 10) + cann.minu));
cann.mill = Math.floor((decimal * 100 * 10 * 100 * 10 * 100) % 1000);

@@ -384,3 +384,2 @@

else {
window.helper = helper; // TODO: Remove this line!
return Cannonian;

@@ -387,0 +386,0 @@ }

@@ -12,3 +12,3 @@ {

],
"version": "1.1.1",
"version": "1.1.2",
"dependencies": {},

@@ -15,0 +15,0 @@ "devDependencies": {

@@ -14,3 +14,3 @@ Cannonian.js

var Cannonian = require('cannonian');
var Cannonian = require("cannonian");

@@ -20,3 +20,4 @@ ##Usage

var cannonian = new Cannonian();
var cannoniana = new Cannonian();
var cannonianb = new Cannonian(new Date(), 0, 0);

@@ -33,6 +34,6 @@ The constructor has 3 parameters:

* Date objects - e.g. new Date()
* Date strings - e.g. 'Tues Jan 1 2013 06:45:00 GMT+0000 (GMT)'
* Decimals - e.g. 0.5
* Standard time strings - e.g. '12:45:30'
* Cannonian time strings - e.g. '53.125'
* Date strings - e.g. "Tues Jan 1 2013 06:45:00 GMT+0000 (GMT)"
* Decimals - e.g. 0.75 (equivalent to 6pm)
* Standard time strings - e.g. "12:45:30"
* Cannonian time strings - e.g. "53.125"
* Cannonian time primitive objects - e.g. { hour: 50, minute: 3, centiminute: 50 }

@@ -42,6 +43,12 @@ * Standard time primitive objects - e.g. { hour: 12, minute: 30, second: 30 }

###Public Functions
####set
var cannonian = new Cannonian();
cannonian.set("12.345");
Sets a new value for the Cannonian object. Parameter is equivalent to 'p' parameter of constructor (see above).
####toStan
var cannonian = new Cannonian('12:00');
cannonian.toStan(3); // '12:00:00'
var cannonian = new Cannonian("12:00");
cannonian.toStan(3); // "12:00:00"
Returns the standard time in 24-hour string.

@@ -51,4 +58,4 @@

var cannonian = new Cannonian('12:00');
cannonian.toCann(3); // '50.000'
var cannonian = new Cannonian("12:00");
cannonian.toCann(3); // "50.000"
Returns the cannononian time in decimal-style string.

@@ -58,3 +65,3 @@

var cannonian = new Cannonian('12.345');
var cannonian = new Cannonian("12.345");
cannonian.toDec(5); // 0.12345

@@ -65,3 +72,3 @@ Returns a decimal value equivalent to cannonian time.

var cannonian = new Cannonian('12.345');
var cannonian = new Cannonian("12.345");
cannonian.toCannObject(); // { hour: 12, minu: 3, cent: 45, mill: 0, minute: 3, centiminute: 45, milliminute: 0 }

@@ -72,4 +79,4 @@ Returns a primitive object representation of Cannonian time.

var cannonian = new Cannonian('12:30:45');
var cannonian = new Cannonian("12:30:45");
cannonian.toStanObject(); // { hour: 12, minu: 30, seco: 45, mill: 0, minute: 30, second: 45, millisecond: 0 }
Returns a primitive object representation of Standard time.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc