Socket
Socket
Sign inDemoInstall

date.format

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

date.format - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

LICENSE

19

format.js

@@ -16,3 +16,3 @@ /* jslint node: true */

Y: date.getUTCFullYear(),
M: date.getUTCMonth(),
M: date.getUTCMonth() + 1,
D: date.getUTCDate(),

@@ -27,3 +27,3 @@ h: date.getUTCHours(),

Y: date.getFullYear(),
M: date.getMonth(),
M: date.getMonth() + 1,
D: date.getDate(),

@@ -36,3 +36,5 @@ h: date.getHours(),

}
d.YY = d.Y.toString();
d.YYYY = d.Y.toString()
d.YY = d.Y.toString().slice(2);
d.MM = d.M.toString();

@@ -54,12 +56,1 @@ d.DD = d.D.toString();

}
/* -------------------------------- */
var date = new Date();
console.log(date.format("Local: Day {Y}/{M}/{D} at {h}:{m}:{s} and {ms}ms"));
console.log(date.format("Local: Day {YY}/{MM}/{DD} at {hh}:{mm}:{ss} and {mss}ms"));
console.log(date.format("UTC: Day {Y}/{M}/{D} at {h}:{m}:{s} and {ms}ms",true));
console.log(date.format("UTC: Day {YY}/{MM}/{DD} at {hh}:{mm}:{ss} and {mss}ms",true));
/* -------------------------------- */
{
"name": "date.format",
"description": "JS Date format utility (UTC/local), (new Date()).format('Today {Y}/{M}/{D} at {h}:{m}:{s}:{ms}');",
"version": "0.1.0",
"version": "1.0.0",
"author": {
"name": "Bifuer",
"name": "Javier Gallego Martín",
"email": "bifuer@gmail.com"
},
"contributors": [
{
"name": "Chelo Quilón Gomez",
"email": "cheloq@gmail.com"
}
],
"homepage": "https://github.com/bifuer/date.format",
"repository": {

@@ -13,8 +20,33 @@ "type": "git",

},
"main": "./format.js",
"scripts": {},
"bugs": {
"url": "https://github.com/bifuer/date.format/issues",
"email" : "bifuer@gmail.com"
},
"keywords": [
"date",
"time",
"format",
"parse",
"beautify",
"pattern"
],
"dependencies": {
"string.format":"*"
"string.format": "*"
},
"readmeFilename": "readme.md"
"devDependencies": {
"mocha": "*",
"unit.js": "*"
},
"main": "./format.js",
"scripts":{
"test": "mocha test/"
},
"preferGlobal": false,
"files": [
"LICENSE",
"README.md",
"format.js"
],
"readmeFilename": "readme.md",
"license": "MIT"
}
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