@zkochan/pnpm
Version:
Fast, disk space efficient package manager
122 lines (121 loc) • 11.1 kB
JSON
{
"_args": [
[
{
"raw": "daty@^1.0.7",
"scope": null,
"escapedName": "daty",
"name": "daty",
"rawSpec": "^1.0.7",
"spec": ">=1.0.7 <2.0.0",
"type": "range"
},
"/home/zkochan/src/pnpm/packages/pnpm/node_modules/bug-killer"
]
],
"_from": "daty@>=1.0.7 <2.0.0",
"_id": "daty@1.1.4",
"_inCache": true,
"_location": "/daty",
"_nodeVersion": "8.6.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/daty-1.1.4.tgz_1514142770951_0.4180024075321853"
},
"_npmUser": {
"name": "ionicabizau",
"email": "bizauionica@gmail.com"
},
"_npmVersion": "5.3.0",
"_phantomChildren": {},
"_requested": {
"raw": "daty@^1.0.7",
"scope": null,
"escapedName": "daty",
"name": "daty",
"rawSpec": "^1.0.7",
"spec": ">=1.0.7 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/bug-killer"
],
"_resolved": "https://registry.npmjs.org/daty/-/daty-1.1.4.tgz",
"_shasum": "b94ce6e68bc7559bf4e6b09ac5f31c33d7787574",
"_shrinkwrap": null,
"_spec": "daty@^1.0.7",
"_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/bug-killer",
"author": {
"name": "Ionică Bizău",
"email": "bizauionica@gmail.com",
"url": "https://ionicabizau.net"
},
"blah": {
"h_img": "http://i.imgur.com/E2GKGYK.png"
},
"bugs": {
"url": "https://github.com/IonicaBizau/daty/issues"
},
"dependencies": {
"add-subtract-date": "^1.0.0",
"class-methods": "^1.0.4",
"date-unit-ms": "^1.1.0",
"diff-dates": "^1.0.0",
"formatoid": "^1.0.0"
},
"description": "A tiny library to manage date objects.",
"devDependencies": {
"tester": "^1.3.3"
},
"directories": {
"example": "example",
"test": "test"
},
"dist": {
"integrity": "sha512-+rVSSQ0TMLtyUuBJwDj8o52wpfHzrip2lICUnp0ccqdQJqWSdUde2E5+CviRvfCN03X74SyWOZlMo5TLxgWLFA==",
"shasum": "b94ce6e68bc7559bf4e6b09ac5f31c33d7787574",
"tarball": "https://registry.npmjs.org/daty/-/daty-1.1.4.tgz"
},
"files": [
"bin/",
"app/",
"lib/",
"dist/",
"src/",
"scripts/",
"resources/",
"menu/",
"cli.js",
"index.js",
"bloggify.js",
"bloggify.json",
"bloggify/"
],
"gitHead": "b9eaf67849fa788d02f1128a5b27608c40bd58e2",
"homepage": "https://github.com/IonicaBizau/daty#readme",
"keywords": [
"date",
"object",
"tiny"
],
"license": "MIT",
"main": "lib/index.js",
"maintainers": [
{
"name": "ionicabizau",
"email": "bizauionica@gmail.com"
}
],
"name": "daty",
"optionalDependencies": {},
"readme": "<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->\n\n\n[](#)\n\n# daty\n\n [![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [](https://github.com/IonicaBizau/ama) [](https://www.npmjs.com/package/daty) [](https://www.npmjs.com/package/daty)\n\n> A tiny library to manage date objects.\n\n## :cloud: Installation\n\n```sh\n# Using npm\nnpm install --save daty\n\n# Using yarn\nyarn add daty\n```\n\n\n## :clipboard: Example\n\n\n\n```js\nconst Daty = require(\"daty\");\n\n// You can initialize Daty using the date parameters\nconst d = new Daty(2015, 11, 16, 18, 42);\n\n// ...but you have friendly date formatting\nconsole.log(d.format(\"LL\"));\n// => December 16, 2015\n\nconsole.log(d.format(\"LLLL\"));\n// => Wednesday, December 16, 2015 6:42 PM\n\nconsole.log(d.utc().format(\"LLLL\"));\n// => Wednesday, December 16, 2015 4:42 PM\n\n// Go back in the history, when the Romanian revolution started in 1989\n// We will clone the current date since we will need it later.\n// Also, subtract 26 years.\nconst revolutionDate = d.clone().subtract(26, \"years\");\nconsole.log(revolutionDate.format(\"LLL\"));\n// => December 16, 1989 12:00 AM\n\n// Make a difference in years\nconst difference = new Daty().diff(revolutionDate, \"years\");\n\nconsole.log(`Right now there are ${difference} years since the Romanian revolution, 1989.`);\n// => Right now there are 26 years since the Romanian revolution, 1989.\n```\n\n\n\n## :question: Get Help\n\nThere are few ways to get help:\n\n 1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.\n 2. For bug reports and feature requests, open issues. :bug:\n\n 3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:\n\n\n\n## :memo: Documentation\n\n\n### `format(s)`\nFormats the date by specifying the format.\n\n#### Params\n\n- **String** `s`: The date format using the [`formatoid`](https://github.com/IonicaBizau/formatoid) supported fields or the presets:\n - `L` : `M/D/YYYY`\n - `LL`: `MMMM D, YYYY`\n - `LLL`: `MMMM D, YYYY hh:mm A`\n - `LLLL`: `dddd, MMMM D, YYYY h:m A`\n\nIf not specified, the date object will be stringified using the native `toString()` method.\n\n#### Return\n- **String** The formated date.\n\n### `add(count, what)`\nAdds a specified number of units to the date.\n\n#### Params\n\n- **String** `count`: The number of units to subtract.\n- **String** `what`: One of the units supported by [`add-subtract-date`](https://github.com/IonicaBizau/add-subtract-date).\n\n#### Return\n- **Daty** The `Daty` instance.\n\n### `subtract(count, what)`\nSubtracts a specified number of units to the date.\n\n#### Params\n\n- **String** `count`: The number of units to subtract.\n- **String** `what`: One of the units supported by [`add-subtract-date`](https://github.com/IonicaBizau/add-subtract-date).\n\n#### Return\n- **Daty** The `Daty` instance.\n\n### `clone()`\nClones the `Daty` instance.\n\n#### Return\n- **Daty** A new `Daty` instance that is cloned from the first one.\n\n### `diff(d, units)`\nMakes the difference between the current instance and a specified `Daty` instance.\n\n#### Params\n\n- **Daty|Date** `d`: The date object.\n- **String** `units`: One of the units supported by [`diff-dates`](https://github.com/IonicaBizau/diff-dates)\n\n#### Return\n- **Number** The difference result (in units).\n\n### `isEqual(d)`\nChecks if the date instance is equal to another date object.\n\n#### Params\n\n- **Daty|Date** `d`: The date object.\n\n#### Return\n- **Boolean** `true` if they are equal, `false` otherwise.\n\n### `isBefore(d)`\nChecks if the date instance is before to another date object.\n\n#### Params\n\n- **Daty|Date** `d`: The date object.\n\n#### Return\n- **Boolean** `true` if the date object is before the specified date or `false` otherwise.\n\n### `isAfter(d)`\nChecks if the date instance is after another date object.\n\n#### Params\n\n- **Daty|Date** `d`: The date object.\n\n#### Return\n- **Boolean** `true` if the date object is after the specified date or `false` otherwise.\n\n### `isAfter()`\nisValid\nChecks if the date instance is valid.\n\n#### Return\n- **Boolean** `true` if the date object is valid, `false` otherwise.\n\n### `utc()`\nUseful to format the date in UTC.\n\n#### Return\n- **Daty** A new `Daty` instance which will be formatted in UTC output.\n\n\n\n## :yum: How to contribute\nHave an idea? Found a bug? See [how to contribute][contributing].\n\n\n## :sparkling_heart: Support my projects\n\nI open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously,\nthis takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).\n\nHowever, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:\n\n - Starring and sharing the projects you like :rocket:\n - [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book:\n - [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:\n - [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).\n - **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`\n\n \n\nThanks! :heart:\n\n\n## :dizzy: Where is this library used?\nIf you are using this library in one of your projects, add it in this list. :sparkles:\n\n\n - [`3abn`](https://github.com/IonicaBizau/3abn#readme)—A 3ABN radio client in the terminal.\n - [`bloggify-article`](https://github.com/Bloggify/bloggify-article#readme) (by Bloggify)—The Bloggify article class.\n - [`bloggify-shop`](https://github.com/IonicaBizau/bloggify-shop#readme)—eCommerce plugin for Bloggify.\n - [`bug-killer`](https://github.com/IonicaBizau/node-bug-killer)—Simple way to log messages in stdout or other stream.\n - [`cli-sunset`](https://github.com/IonicaBizau/cli-sunset)—A fancy command line tool for knowing the sunset time.\n - [`cute-logger`](https://github.com/IonicaBizau/cute-logger)—Simple way to log messages in stdout or other stream.\n - [`git-stats-html`](https://github.com/IonicaBizau/git-stats-html#readme)—Turn git-stats result into HTML output.\n - [`idea`](https://github.com/IonicaBizau/idea)—A lightweight CLI tool and module for keeping ideas in a safe place quick and easy.\n - [`sunset-app-bloggify`](https://github.com/Bloggify/sunset#readme) (by Bloggify)—Get sunset times.\n - [`sunset-year`](https://github.com/IonicaBizau/sunset-year#readme)—Sunset times during the year, every week.\n\n## :scroll: License\n\n[MIT][license] © [Ionică Bizău][website]\n\n[badge_patreon]: http://ionicabizau.github.io/badges/patreon.svg\n[badge_amazon]: http://ionicabizau.github.io/badges/amazon.svg\n[badge_paypal]: http://ionicabizau.github.io/badges/paypal.svg\n[badge_paypal_donate]: http://ionicabizau.github.io/badges/paypal_donate.svg\n[patreon]: https://www.patreon.com/ionicabizau\n[amazon]: http://amzn.eu/hRo9sIZ\n[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW\n[donate-now]: http://i.imgur.com/6cMbHOC.png\n\n[license]: http://showalicense.com/?fullname=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica%40gmail.com%3E%20(https%3A%2F%2Fionicabizau.net)&year=2015#license-mit\n[website]: https://ionicabizau.net\n[contributing]: /CONTRIBUTING.md\n[docs]: /DOCUMENTATION.md\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/IonicaBizau/daty.git"
},
"scripts": {
"test": "node test"
},
"version": "1.1.4"
}