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). |
@@ -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"); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
106265
4002