{"_id":"@abcnews/fuzzy-dates","_rev":"16-e823a2d60fbdaacae20f021a07de39f9","name":"@abcnews/fuzzy-dates","description":"A fuzzy date parser/sorter","dist-tags":{"latest":"1.3.1"},"versions":{"1.0.0":{"name":"@abcnews/fuzzy-dates","version":"1.0.0","description":"A fuzzy date parser/sorter","main":"lib/index.js","scripts":{"test":"npm run compile && jest","compile":"babel -d lib/ src/","prepublish":"npm run compile"},"repository":{"type":"git","url":"git+ssh://git@github.com/abcnews/fuzzy-dates.git"},"keywords":["fuzzy","dates"],"author":{"name":"Nathan Hoad"},"license":"ISC","bugs":{"url":"https://github.com/abcnews/fuzzy-dates/issues"},"homepage":"https://github.com/abcnews/fuzzy-dates#readme","dependencies":{"date-fns":"^1.28.5"},"devDependencies":{"babel-cli":"^6.26.0","babel-preset-es2015":"^6.24.1","jest":"^21.2.1"},"gitHead":"05c4fa31417696ea09422ac6f07d7550a42d9e36","_id":"@abcnews/fuzzy-dates@1.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.6.0","_npmUser":{"name":"nathanhoad","email":"nathan@nathanhoad.net"},"dist":{"integrity":"sha512-QVvhuEg3+NDo8lsI6Ju2k3MEF4zbRoFe8sHf1BhGK4X50Hpxndv6zbAaG8NyyQpi6DUpbJURqh0nYH/RFhqgbQ==","shasum":"5de2f3a2256c2d9d3bb242879bdd1e45e55251e1","tarball":"https://registry.npmjs.org/@abcnews/fuzzy-dates/-/fuzzy-dates-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCME4qNTp5FB3yjMjWrQaLk/rW9wm9PIaQWi+em8vS8eQIhAJMNvjso5pdGiZFB8A96FEyQoEd26WDAhN1vHaBIUO9r"}]},"maintainers":[{"name":"nathanhoad","email":"nathan@nathanhoad.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fuzzy-dates-1.0.0.tgz_1507614175636_0.9752032139804214"},"directories":{}},"1.1.0":{"name":"@abcnews/fuzzy-dates","version":"1.1.0","description":"A fuzzy date parser/sorter","main":"lib/index.js","scripts":{"test":"npm run compile && jest","compile":"babel -d lib/ src/","prepublish":"npm run compile"},"repository":{"type":"git","url":"git+ssh://git@github.com/abcnews/fuzzy-dates.git"},"keywords":["fuzzy","dates"],"author":{"name":"Nathan Hoad"},"license":"ISC","bugs":{"url":"https://github.com/abcnews/fuzzy-dates/issues"},"homepage":"https://github.com/abcnews/fuzzy-dates#readme","dependencies":{"date-fns":"^1.28.5"},"devDependencies":{"babel-cli":"^6.26.0","babel-preset-es2015":"^6.24.1","jest":"^21.2.1"},"gitHead":"f1c9a96434d847f5bc8734d3275e5346eb230dbe","_id":"@abcnews/fuzzy-dates@1.1.0","_npmVersion":"5.4.2","_nodeVersion":"8.6.0","_npmUser":{"name":"nathanhoad","email":"nathan@nathanhoad.net"},"dist":{"integrity":"sha512-OkttiYWIIQM+2IEK6f8mkoiqzId+5FsSlZJNi3eY0KVtCEreAC9i67sjO9Jq5R98H0901AnIpOI1UEw6esLz+w==","shasum":"e810db78ccb87d85143cb49bd885bc1dbed13f91","tarball":"https://registry.npmjs.org/@abcnews/fuzzy-dates/-/fuzzy-dates-1.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID//YYpPBozg3Gj2vZ87oQhXxxkIhJIsmLpcSphsa8yKAiAvVUQMOZedQEto0V9+CwE53H05KqNdfaVPaSLa2hJwAA=="}]},"maintainers":[{"email":"nathan@nathanhoad.net","name":"nathanhoad"},{"email":"louisstow@gmail.com","name":"louisstow"},{"email":"blake.butcher@abc.net.au","name":"blakebutcher"},{"email":"npm@joshduck.com","name":"joshduck"},{"email":"colin@colin-gourlay.com","name":"colingourlay"},{"email":"simon@elvery.net","name":"drzax"},{"email":"ash@kyd.com.au","name":"ashkyd"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fuzzy-dates-1.1.0.tgz_1507682453219_0.4075394074898213"},"directories":{}},"1.2.0":{"name":"@abcnews/fuzzy-dates","version":"1.2.0","description":"A fuzzy date parser/sorter","main":"lib/index.js","scripts":{"test":"npm run compile && jest","compile":"babel -d lib/ src/","prepublish":"npm run compile"},"repository":{"type":"git","url":"git+ssh://git@github.com/abcnews/fuzzy-dates.git"},"keywords":["fuzzy","dates"],"author":{"name":"Nathan Hoad"},"license":"ISC","bugs":{"url":"https://github.com/abcnews/fuzzy-dates/issues"},"homepage":"https://github.com/abcnews/fuzzy-dates#readme","dependencies":{"date-fns":"^1.28.5"},"devDependencies":{"babel-cli":"^6.26.0","babel-preset-es2015":"^6.24.1","jest":"^21.2.1"},"gitHead":"904410a55bbfeb1c9192fa306ae7f989305b4989","_id":"@abcnews/fuzzy-dates@1.2.0","_npmVersion":"5.4.2","_nodeVersion":"8.6.0","_npmUser":{"name":"nathanhoad","email":"nathan@nathanhoad.net"},"dist":{"integrity":"sha512-63TLKOKL0aWbZ3xUqn3UCMTAfkqUQ7Aap/ebxDB/FRdZ+2i/c2rjMMQBsMeGekvl+cSCmrw4xMm8mjiHfjidsg==","shasum":"dba1d4181dbddc9a68bc42138daca11ef5114901","tarball":"https://registry.npmjs.org/@abcnews/fuzzy-dates/-/fuzzy-dates-1.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHAmj4qa3rgq8tRfJ7TNcTk/la+cyyL6hNcpj9FqMTyoAiEAobKVM/4Q2CyymUrDYEx47/iIyySrPUzDSwQqBDnz19A="}]},"maintainers":[{"email":"nathan@nathanhoad.net","name":"nathanhoad"},{"email":"louisstow@gmail.com","name":"louisstow"},{"email":"blake.butcher@abc.net.au","name":"blakebutcher"},{"email":"npm@joshduck.com","name":"joshduck"},{"email":"colin@colin-gourlay.com","name":"colingourlay"},{"email":"simon@elvery.net","name":"drzax"},{"email":"ash@kyd.com.au","name":"ashkyd"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fuzzy-dates-1.2.0.tgz_1507770263942_0.5807879904750735"},"directories":{}},"1.3.0":{"name":"@abcnews/fuzzy-dates","version":"1.3.0","description":"A fuzzy date parser/sorter","main":"lib/index.js","scripts":{"test":"npm run compile && jest","compile":"babel -d lib/ src/","prepublish":"npm run compile"},"repository":{"type":"git","url":"git+ssh://git@github.com/abcnews/fuzzy-dates.git"},"keywords":["fuzzy","dates"],"author":{"name":"Nathan Hoad"},"license":"ISC","bugs":{"url":"https://github.com/abcnews/fuzzy-dates/issues"},"homepage":"https://github.com/abcnews/fuzzy-dates#readme","dependencies":{"date-fns":"^1.28.5"},"devDependencies":{"babel-cli":"^6.26.0","babel-preset-es2015":"^6.24.1","jest":"^21.2.1"},"gitHead":"3c3ac9c652612d99dac04f95a8e0d26f502dd5d6","_id":"@abcnews/fuzzy-dates@1.3.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.0","_npmUser":{"name":"nathanhoad","email":"nathan@nathanhoad.net"},"dist":{"integrity":"sha512-VLGYIzOSMF/pK4YcvySL4o7BHB7QalxvWQbENFlLT1Tgf6fZNRskaZ6plAP4Je31RPw0IJjwuFobSRYsqLFQPg==","shasum":"2382c4df799414c1f97ddc2bfcd43103f6f724a2","tarball":"https://registry.npmjs.org/@abcnews/fuzzy-dates/-/fuzzy-dates-1.3.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3UjVKefJGOo45eMPptl/j/rcOOxxTkbCMh1pnMCHr3AiBO8RQ9JgVpOiad9vzJMYvViLydxo0BC4pzxOBpZ1j9sw=="}]},"maintainers":[{"email":"nathan@nathanhoad.net","name":"nathanhoad"},{"email":"louisstow@gmail.com","name":"louisstow"},{"email":"blake.butcher@abc.net.au","name":"blakebutcher"},{"email":"npm@joshduck.com","name":"joshduck"},{"email":"colin@colin-gourlay.com","name":"colingourlay"},{"email":"simon@elvery.net","name":"drzax"},{"email":"ash@kyd.com.au","name":"ashkyd"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fuzzy-dates-1.3.0.tgz_1516064673294_0.5004874295555055"},"directories":{}},"1.3.1":{"name":"@abcnews/fuzzy-dates","version":"1.3.1","description":"A fuzzy date parser/sorter","main":"lib/index.js","scripts":{"test":"npm run compile && jest","compile":"babel -d lib/ src/","prepublish":"npm run compile"},"repository":{"type":"git","url":"git+ssh://git@github.com/abcnews/fuzzy-dates.git"},"keywords":["fuzzy","dates"],"author":{"name":"Nathan Hoad"},"license":"ISC","bugs":{"url":"https://github.com/abcnews/fuzzy-dates/issues"},"homepage":"https://github.com/abcnews/fuzzy-dates#readme","dependencies":{"date-fns":"^1.28.5"},"devDependencies":{"babel-cli":"^6.26.0","babel-preset-es2015":"^6.24.1","jest":"^21.2.1"},"gitHead":"4f8345f382f0f4cc6986b9bb8520574b144a78da","_id":"@abcnews/fuzzy-dates@1.3.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.0","_npmUser":{"name":"nathanhoad","email":"nathan@nathanhoad.net"},"dist":{"integrity":"sha512-q/Q4POyHS4vQzzlgoiRMtwdtBpS5eWtQMoETSb+9yiw3bVBgctVmMDF+YYtPgjdddjFN0+zMGXI+74J50Dz2rQ==","shasum":"180cf14a84d4b8b1d628923512eb7b3ca84eaabd","tarball":"https://registry.npmjs.org/@abcnews/fuzzy-dates/-/fuzzy-dates-1.3.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuWLOeeEZdcSaFGHHExB79IwKlEBMAgHbTBAWgo54PowIgC18mION/ST/VLTRVik/BlG4D0+c+JOWI81SsV/Wk8sk="}]},"maintainers":[{"email":"nathan@nathanhoad.net","name":"nathanhoad"},{"email":"louisstow@gmail.com","name":"louisstow"},{"email":"blake.butcher@abc.net.au","name":"blakebutcher"},{"email":"npm@joshduck.com","name":"joshduck"},{"email":"colin@colin-gourlay.com","name":"colingourlay"},{"email":"simon@elvery.net","name":"drzax"},{"email":"ash@kyd.com.au","name":"ashkyd"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fuzzy-dates-1.3.1.tgz_1516065362510_0.40961687406525016"},"directories":{}}},"readme":"# Fuzzy Dates\n\nParse/compare fuzzy dates\n\n## Usage\n\nWhen you `parse` a string you will get back a `Date` object with a `fuzzy` boolean property attached.\n\n```javascript\nconst FuzzyDates = require('@abcnews/fuzzy-dates');\n\n// Basic date formats (.fuzzy is false)\nFuzzyDates.parse('January 10, 2017');\nFuzzyDates.parse('10 January, 2017');\nFuzzyDates.parse('10 January 2017');\nFuzzyDates.parse('Tuesday January 10th 2017');\nFuzzyDates.parse('Jan 10th 2017');\n\n// Assume the 1st of the month (.fuzzy is true)\nFuzzyDates.parse('Jan 2017');\n\n// Assume a year (.fuzzy is false). Will either use the year from the second parameter or just the current year\nFuzzyDates.parse('February 2'); // will use current year\nFuzzyDates.parse('February 2', new Date(2015, 1, 1)); // will use 2015\n\n// You can give a time\nFuzzyDates.parse('10am January 1, 2015');\nFuzzyDates.parse('1pm January 1, 2015');\n\n// Will handle Early, Mid, and Late prefixes in lieu of an actual date\n// The date you get back will have a guessed date number and .fuzzy will be true\nFuzzyDates.parse('Early March, 2017');\nFuzzyDates.parse('Mid January, 2017');\nFuzzyDates.parse('Late February, 2017');\n```\n\nYou can use `compare` to sort fuzzy dates (along with normal dates):\n\n```javascript\nconst FuzzyDates = require('@abcnews/fuzzy-dates');\n\n[\n  FuzzyDates.parse('1st Feb, 2017'),\n  FuzzyDates.parse('Early Feb, 2017'),\n  FuzzyDates.parse('March 12, 2017');\n  FuzzyDates.parse('16 March, 2017'),\n  FuzzyDates.parse('Mid March, 2017'),\n  FuzzyDates.parse('November 8th', new Date(2016, 1, 1)),\n  FuzzyDates.parse('November 30, 2018'),\n  FuzzyDates.parse('Late November, 2018'),\n  FuzzyDates.parse('Late November, 2019')\n].sort(FuzzyDates.compare);\n\n// November 8, 2016\n// February 1, 2017\n// Early February, 2017\n// March 12, 2017\n// Mid March, 2017\n// March 16, 2017\n// Late November 2018\n// November 30, 2018\n// Late November, 2019\n```\n\nYou can also output a date in a nice and simple format\n\n```javascript\nconst FuzzyDates = require('@abcnews/fuzzy-dates');\n\nlet date = FuzzyDates.parse('10 March 2015');\nFuzzyDates.formatDate(date); // March 10, 2015\n\ndate = FuzzyDates.parse('2017, Late November');\nFuzzyDates.formatDate(date); // Late November, 2017\n```\n\n## Authors\n\n- Nathan Hoad ([nathan@nathanhoad.net](mailto:nathan@nathanhoad.net))","maintainers":[{"email":"ash@kyd.com.au","name":"ashkyd"},{"email":"hi@jtfell.com","name":"jtfell"},{"email":"phocks@gmail.com","name":"phocks"},{"email":"andy@andrewkesper.com","name":"andrewkesper"},{"email":"simon@elvery.net","name":"drzax"}],"time":{"modified":"2023-08-10T04:59:29.481Z","created":"2017-10-10T05:42:55.778Z","1.0.0":"2017-10-10T05:42:55.778Z","1.1.0":"2017-10-11T00:40:53.308Z","1.2.0":"2017-10-12T01:04:24.001Z","1.3.0":"2018-01-16T01:04:33.359Z","1.3.1":"2018-01-16T01:16:02.590Z"},"homepage":"https://github.com/abcnews/fuzzy-dates#readme","keywords":["fuzzy","dates"],"repository":{"type":"git","url":"git+ssh://git@github.com/abcnews/fuzzy-dates.git"},"author":{"name":"Nathan Hoad"},"bugs":{"url":"https://github.com/abcnews/fuzzy-dates/issues"},"license":"ISC","readmeFilename":"README.md"}