Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jymin

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jymin - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

45

jymin.js
/**
* _ _ ___ _____ _____
* | |_ _ _ __ ___ (_)_ __ __ __/ _ \ |___ / |___ /
* _ | | | | | '_ ` _ \| | '_ \ \ \ / / | | | |_ \ |_ \
* | |_| | |_| | | | | | | | | | | \ V /| |_| | ___) | ___) |
* \___/ \__, |_| |_| |_|_|_| |_| \_/ \___(_)____(_)____/
* _ _ ___ _____ _ _
* | |_ _ _ __ ___ (_)_ __ __ __/ _ \ |___ /| || |
* _ | | | | | '_ ` _ \| | '_ \ \ \ / / | | | |_ \| || |_
* | |_| | |_| | | | | | | | | | | \ V /| |_| | ___) |__ _|
* \___/ \__, |_| |_| |_|_|_| |_| \_/ \___(_)____(_) |_|
* |___/

@@ -33,3 +33,3 @@ *

this.jymin = {version: '0.3.3'};
this.jymin = {version: '0.3.4'};

@@ -419,2 +419,35 @@ /**

};
/*
* Takes a js date object and returns something in the format of
* "August 26,2014 at 7:42pm"
*/
var formatLongDate = function (date) {
var MONTHS = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
];
isDate(date) ? 0 : (date = new Date(+date || date));
var m = MONTHS[date.getMonth()];
var isAm = true;
var h = +date.getHours();
var minutes = date.getMinutes();
minutes = minutes > 10 ? minutes : "0" + minutes;
h > 12 ? (isAm = false, h -= 12) : (h === 0 ? h = 12 : 0);
return m + " " + date.getDate() + ", " + date.getFullYear() + " at " + h +
":" + minutes + (isAm ? "AM" : "PM");
}
/*
* Takes a js date object and returns something in the format of
* "8/26/14 7:42pm"
*/
var formatShortDate = function (date) {
isDate(date) ? 0 : (date = new Date(+date || date));
var m = date.getMonth() + 1;
var isAm = true;
var h = +date.getHours();
var minutes = date.getMinutes();
minutes = minutes > 10 ? minutes : "0" + minutes;
h > 12 ? (isAm = false, h -= 12) : (h === 0 ? h = 12 : 0);
return m + "/" + date.getDate() + "/" + date.getFullYear() % 100 + " " + h +
":" + minutes + (isAm ? "AM" : "PM");
}
/**

@@ -421,0 +454,0 @@ * Get a DOM element by its ID (if the argument is an ID).

2

package.json

@@ -15,3 +15,3 @@ {

],
"version": "0.3.3",
"version": "0.3.4",
"main": "chug/chug.js",

@@ -18,0 +18,0 @@ "homepage": "http://lighter.io/jymin",

@@ -36,1 +36,34 @@ /**

};
/*
* Takes a js date object and returns something in the format of
* "August 26,2014 at 7:42pm"
*/
var formatLongDate = function (date) {
var MONTHS = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
];
isDate(date) ? 0 : (date = new Date(+date || date));
var m = MONTHS[date.getMonth()];
var isAm = true;
var h = +date.getHours();
var minutes = date.getMinutes();
minutes = minutes > 10 ? minutes : "0" + minutes;
h > 12 ? (isAm = false, h -= 12) : (h === 0 ? h = 12 : 0);
return m + " " + date.getDate() + ", " + date.getFullYear() + " at " + h +
":" + minutes + (isAm ? "AM" : "PM");
}
/*
* Takes a js date object and returns something in the format of
* "8/26/14 7:42pm"
*/
var formatShortDate = function (date) {
isDate(date) ? 0 : (date = new Date(+date || date));
var m = date.getMonth() + 1;
var isAm = true;
var h = +date.getHours();
var minutes = date.getMinutes();
minutes = minutes > 10 ? minutes : "0" + minutes;
h > 12 ? (isAm = false, h -= 12) : (h === 0 ? h = 12 : 0);
return m + "/" + date.getDate() + "/" + date.getFullYear() % 100 + " " + h +
":" + minutes + (isAm ? "AM" : "PM");
}
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