{ "_args": [ [ { "raw": "dateformat@^2.0.0", "scope": null, "escapedName": "dateformat", "name": "dateformat", "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, "/home/jdaugherty/work/GT2/GT2-Android/node_modules/gulp-util" ] ], "_from": "dateformat@>=2.0.0 <3.0.0", "_id": "dateformat@2.2.0", "_inCache": true, "_location": "/dateformat", "_nodeVersion": "6.7.0", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/dateformat-2.2.0.tgz_1505980201538_0.9515526841860265" }, "_npmUser": { "name": "fpintos", "email": "fpintos.npm@outlook.com" }, "_npmVersion": "3.10.3", "_phantomChildren": {}, "_requested": { "raw": "dateformat@^2.0.0", "scope": null, "escapedName": "dateformat", "name": "dateformat", "rawSpec": "^2.0.0", "spec": ">=2.0.0 <3.0.0", "type": "range" }, "_requiredBy": [ "/gulp-util" ], "_resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", "_shasum": "4065e2013cf9fb916ddfd82efb506ad4c6769062", "_shrinkwrap": null, "_spec": "dateformat@^2.0.0", "_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/gulp-util", "author": { "name": "Steven Levithan" }, "bugs": { "url": "https://github.com/felixge/node-dateformat/issues" }, "contributors": [ { "name": "Steven Levithan" }, { "name": "Felix Geisendörfer", "email": "felix@debuggable.com" }, { "name": "Christoph Tavan", "email": "dev@tavan.de" }, { "name": "Jon Schlinkert", "url": "https://github.com/jonschlinkert" } ], "dependencies": {}, "description": "A node.js package for Steven Levithan's excellent dateFormat() function.", "devDependencies": { "mocha": "2.0.1", "underscore": "1.7.0" }, "directories": {}, "dist": { "shasum": "4065e2013cf9fb916ddfd82efb506ad4c6769062", "tarball": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz" }, "engines": { "node": "*" }, "gitHead": "849ecab04ac9337cc96564c081382aed981aa961", "homepage": "https://github.com/felixge/node-dateformat", "license": "MIT", "main": "lib/dateformat", "maintainers": "Felix Geisendörfer ", "name": "dateformat", "optionalDependencies": {}, "readme": "# dateformat\r\n\r\nA node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function.\r\n\r\n[![Build Status](https://travis-ci.org/felixge/node-dateformat.svg)](https://travis-ci.org/felixge/node-dateformat)\r\n\r\n## Modifications\r\n\r\n* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers.\r\n* Added a `module.exports = dateFormat;` statement at the bottom\r\n* Added the placeholder `N` to get the ISO 8601 numeric representation of the day of the week\r\n\r\n## Installation\r\n\r\n```bash\r\n$ npm install dateformat\r\n$ dateformat --help\r\n```\r\n\r\n## Usage\r\n\r\nAs taken from Steven's post, modified to match the Modifications listed above:\r\n```js\r\nvar dateFormat = require('dateformat');\r\nvar now = new Date();\r\n\r\n// Basic usage\r\ndateFormat(now, \"dddd, mmmm dS, yyyy, h:MM:ss TT\");\r\n// Saturday, June 9th, 2007, 5:46:21 PM\r\n\r\n// You can use one of several named masks\r\ndateFormat(now, \"isoDateTime\");\r\n// 2007-06-09T17:46:21\r\n\r\n// ...Or add your own\r\ndateFormat.masks.hammerTime = 'HH:MM! \"Can\\'t touch this!\"';\r\ndateFormat(now, \"hammerTime\");\r\n// 17:46! Can't touch this!\r\n\r\n// You can also provide the date as a string\r\ndateFormat(\"Jun 9 2007\", \"fullDate\");\r\n// Saturday, June 9, 2007\r\n\r\n// Note that if you don't include the mask argument,\r\n// dateFormat.masks.default is used\r\ndateFormat(now);\r\n// Sat Jun 09 2007 17:46:21\r\n\r\n// And if you don't include the date argument,\r\n// the current date and time is used\r\ndateFormat();\r\n// Sat Jun 09 2007 17:46:22\r\n\r\n// You can also skip the date argument (as long as your mask doesn't\r\n// contain any numbers), in which case the current date/time is used\r\ndateFormat(\"longTime\");\r\n// 5:46:22 PM EST\r\n\r\n// And finally, you can convert local time to UTC time. Simply pass in\r\n// true as an additional argument (no argument skipping allowed in this case):\r\ndateFormat(now, \"longTime\", true);\r\n// 10:46:21 PM UTC\r\n\r\n// ...Or add the prefix \"UTC:\" or \"GMT:\" to your mask.\r\ndateFormat(now, \"UTC:h:MM:ss TT Z\");\r\n// 10:46:21 PM UTC\r\n\r\n// You can also get the ISO 8601 week of the year:\r\ndateFormat(now, \"W\");\r\n// 42\r\n\r\n// and also get the ISO 8601 numeric representation of the day of the week:\r\ndateFormat(now,\"N\");\r\n// 6\r\n```\r\n\r\n### Mask options\r\n\r\nMask | Description\r\n---- | -----------\r\n`d` | Day of the month as digits; no leading zero for single-digit days.\r\n`dd` | Day of the month as digits; leading zero for single-digit days.\r\n`ddd` | Day of the week as a three-letter abbreviation.\r\n`dddd` | Day of the week as its full name.\r\n`m` | Month as digits; no leading zero for single-digit months.\r\n`mm` | Month as digits; leading zero for single-digit months.\r\n`mmm` | Month as a three-letter abbreviation.\r\n`mmmm` | Month as its full name.\r\n`yy` | Year as last two digits; leading zero for years less than 10.\r\n`yyyy` | Year represented by four digits.\r\n`h` | Hours; no leading zero for single-digit hours (12-hour clock).\r\n`hh` | Hours; leading zero for single-digit hours (12-hour clock).\r\n`H` | Hours; no leading zero for single-digit hours (24-hour clock).\r\n`HH` | Hours; leading zero for single-digit hours (24-hour clock).\r\n`M` | Minutes; no leading zero for single-digit minutes.\r\n`MM` | Minutes; leading zero for single-digit minutes.\r\n`N` | ISO 8601 numeric representation of the day of the week.\r\n`o` | GMT/UTC timezone offset, e.g. -0500 or +0230.\r\n`s` | Seconds; no leading zero for single-digit seconds.\r\n`ss` | Seconds; leading zero for single-digit seconds.\r\n`S` | The date's ordinal suffix (st, nd, rd, or th). Works well with `d`.\r\n`l` | Milliseconds; gives 3 digits.\r\n`L` | Milliseconds; gives 2 digits.\r\n`t`\t| Lowercase, single-character time marker string: a or p.\r\n`tt` | Lowercase, two-character time marker string: am or pm.\r\n`T` | Uppercase, single-character time marker string: A or P.\r\n`TT` | Uppercase, two-character time marker string: AM or PM.\r\n`W` | ISO 8601 week number of the year, e.g. 42\r\n`Z` | US timezone abbreviation, e.g. EST or MDT. With non-US timezones or in the\r\n`'...'`, `\"...\"` | Literal character sequence. Surrounding quotes are removed.\r\n`UTC:` |\tMust be the first four characters of the mask. Converts the date from local time to UTC/GMT/Zulu time before applying the mask. The \"UTC:\" prefix is removed.\r\n\r\n### Named Formats\r\n\r\nName | Mask | Example\r\n---- | ---- | -------\r\n`default` | `ddd mmm dd yyyy HH:MM:ss` | Sat Jun 09 2007 17:46:21\r\n`shortDate` | `m/d/yy` | 6/9/07\r\n`mediumDate` | `mmm d, yyyy` | Jun 9, 2007\r\n`longDate` | `mmmm d, yyyy` | June 9, 2007\r\n`fullDate` | `dddd, mmmm d, yyyy` | Saturday, June 9, 2007\r\n`shortTime` | `h:MM TT` | 5:46 PM\r\n`mediumTime` | `h:MM:ss TT` | 5:46:21 PM\r\n`longTime` | `h:MM:ss TT Z` | 5:46:21 PM EST\r\n`isoDate` | `yyyy-mm-dd` | 2007-06-09\r\n`isoTime` | `HH:MM:ss` | 17:46:21\r\n`isoDateTime` | `yyyy-mm-dd'T'HH:MM:ss` | 2007-06-09T17:46:21\r\n`isoUtcDateTime` | `UTC:yyyy-mm-dd'T'HH:MM:ss'Z'` | 2007-06-09T22:46:21Z\r\n## License\r\n\r\n(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license.\r\n\r\n[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format\r\n[stevenlevithan]: http://stevenlevithan.com/\r\n", "readmeFilename": "Readme.md", "repository": { "type": "git", "url": "git+https://github.com/felixge/node-dateformat.git" }, "scripts": { "test": "mocha" }, "version": "2.2.0" }