dateformat
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -21,2 +21,4 @@ "use strict"; | ||
var _arguments = arguments; | ||
var dateFormat = function () { | ||
@@ -29,3 +31,3 @@ var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g; | ||
// You can't provide utc if you skip other args (use the 'UTC:' mask prefix) | ||
if (arguments.length === 1 && kindOf(date) === "string" && !/\d/.test(date)) { | ||
if (_arguments.length === 1 && kindOf(date) === "string" && !/\d/.test(date)) { | ||
mask = date; | ||
@@ -208,2 +210,3 @@ date = undefined; | ||
shortDate: "m/d/yy", | ||
paddedShortDate: "mm/dd/yyyy", | ||
mediumDate: "mmm d, yyyy", | ||
@@ -228,3 +231,3 @@ longDate: "mmmm d, yyyy", | ||
function pad(val, len) { | ||
var pad = function pad(val, len) { | ||
val = String(val); | ||
@@ -238,3 +241,3 @@ len = len || 2; | ||
return val; | ||
} | ||
}; | ||
/** | ||
@@ -250,3 +253,3 @@ * Get the ISO 8601 week number | ||
function getWeek(date) { | ||
var getWeek = function getWeek(date) { | ||
// Remove time components of date | ||
@@ -266,3 +269,3 @@ var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate()); // Change date to Thursday same week | ||
return 1 + Math.floor(weekDiff); | ||
} | ||
}; | ||
/** | ||
@@ -277,3 +280,3 @@ * Get ISO-8601 numeric representation of the day of the week | ||
function getDayOfWeek(date) { | ||
var getDayOfWeek = function getDayOfWeek(date) { | ||
var dow = date.getDay(); | ||
@@ -286,3 +289,3 @@ | ||
return dow; | ||
} | ||
}; | ||
/** | ||
@@ -295,3 +298,3 @@ * kind-of shortcut | ||
function kindOf(val) { | ||
var kindOf = function kindOf(val) { | ||
if (val === null) { | ||
@@ -314,3 +317,3 @@ return "null"; | ||
return {}.toString.call(val).slice(8, -1).toLowerCase(); | ||
} | ||
}; | ||
@@ -317,0 +320,0 @@ if (typeof define === "function" && define.amd) { |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"license": "MIT", | ||
@@ -23,4 +23,3 @@ "main": "lib/dateformat", | ||
"@babel/preset-env": "^7.12.1", | ||
"mocha": "^8.2.1", | ||
"underscore": "1.7.0" | ||
"mocha": "^8.2.1" | ||
}, | ||
@@ -27,0 +26,0 @@ "engines": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
17405
4
269
0