{"_id":"@calummm/simpledate","_rev":"6-86096dede660f72e8d13eb0850966b07","name":"@calummm/simpledate","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"@calummm/simpledate","version":"0.0.1","description":"Simple date is focussed library. Unlike the native date implementation and many other date libraries, simpledate only cares about valid years, months and days. Simpledate is used when time and timezones do not matter, such as for validating birthday dates","types":"./dist/cjs/types/index.d.ts","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/types/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"clean":"rm -rf ./dist","build":"npm run clean && npm run build:esm && npm run build:cjs","build:esm":"tsc -p ./tsconfig.esm.json && cp dist/esm/index.js dist/esm/index.mjs","build:cjs":"tsc -p ./tsconfig.cjs.json","prepack":"npm run build","test":"vitest","coverage":"vitest run --coverage"},"author":"","license":"ISC","dependencies":{"esm":"^3.2.25"},"devDependencies":{"@vitest/coverage-c8":"^0.31.0","typescript":"^5.0.4","vitest":"^0.31.0"},"prettier":{"singleQuote":true},"gitHead":"751a257269214d50c94c84786709429a187b0687","_id":"@calummm/simpledate@0.0.1","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-BWlZn/LyBiDMgA4jJ9Yh1b7+4g8MGzJAjMPa5SsADWOpBk+7r+w1dWIf5mpaWdl/ysDxKY41vXxLtpxkiDvcjw==","shasum":"288796f8c077f53f81e4c3e8639e46e91c2e26dd","tarball":"https://registry.npmjs.org/@calummm/simpledate/-/simpledate-0.0.1.tgz","fileCount":8,"unpackedSize":24287,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCFOE7vRj1BIx6GBobXJNeV9lN5Q+nmtk7HFbT5rz2OTAIhAKBecLYLidi8ONOgCb32v4ipJfQPumfPzhaJOePOJUjj"}]},"_npmUser":{"name":"calummm","email":"calummm@gmail.com"},"directories":{},"maintainers":[{"name":"calummm","email":"calummm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simpledate_0.0.1_1684125076601_0.0949924642115958"},"_hasShrinkwrap":false},"0.0.2":{"name":"@calummm/simpledate","version":"0.0.2","description":"Simple date is focussed library. Unlike the native date implementation and many other date libraries, simpledate only cares about valid years, months and days. Simpledate is used when time and timezones do not matter, such as for validating birthday dates","types":"./dist/cjs/types/index.d.ts","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/types/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"clean":"rm -rf ./dist","build":"npm run clean && npm run build:esm && npm run build:cjs","build:esm":"tsc -p ./tsconfig.esm.json && cp dist/esm/index.js dist/esm/index.mjs","build:cjs":"tsc -p ./tsconfig.cjs.json","prepack":"npm run build","test":"vitest","coverage":"vitest run --coverage"},"author":"","license":"ISC","dependencies":{"esm":"^3.2.25"},"devDependencies":{"@vitest/coverage-c8":"^0.31.0","typescript":"^5.0.4","vitest":"^0.31.0"},"prettier":{"singleQuote":true},"gitHead":"de7a097f82f167ebc2ee2057287b3679185618f0","_id":"@calummm/simpledate@0.0.2","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-LLcBXgsyKg6apZblSLxU8O+SFJMbXW3fslozvIjZ4AXs1BYxbMskBTlrSi/j/haTFK9yutaJImwcPpk0Ba/OYA==","shasum":"2a1f21090189abe170883d940af823620104240a","tarball":"https://registry.npmjs.org/@calummm/simpledate/-/simpledate-0.0.2.tgz","fileCount":8,"unpackedSize":29079,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDK6/f+5o9PQC6EBcxiuftysZ27v9fTCoTEcre6qR7OxAIhAOST+hMwvTjehHXt0lyGH02DZLa3+vfiO93j/q7PCFD7"}]},"_npmUser":{"name":"calummm","email":"calummm@gmail.com"},"directories":{},"maintainers":[{"name":"calummm","email":"calummm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simpledate_0.0.2_1684216617194_0.38879452136690507"},"_hasShrinkwrap":false},"0.0.3":{"name":"@calummm/simpledate","version":"0.0.3","description":"Simple date is focussed library. Unlike the native date implementation and many other date libraries, simpledate only cares about valid years, months and days. Simpledate is used when time and timezones do not matter, such as for validating birthday dates","types":"./dist/cjs/types/index.d.ts","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/types/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"clean":"rm -rf ./dist","build":"npm run clean && npm run build:esm && npm run build:cjs","build:esm":"tsc -p ./tsconfig.esm.json && cp dist/esm/index.js dist/esm/index.mjs","build:cjs":"tsc -p ./tsconfig.cjs.json","prepack":"npm run build","test":"vitest","coverage":"vitest run --coverage"},"author":"","license":"ISC","dependencies":{"esm":"^3.2.25"},"devDependencies":{"@vitest/coverage-c8":"^0.31.0","typescript":"^5.0.4","vitest":"^0.31.0"},"prettier":{"singleQuote":true},"gitHead":"de7a097f82f167ebc2ee2057287b3679185618f0","_id":"@calummm/simpledate@0.0.3","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-uEBkPoAmK2OQugtl9s5TNZU8Y2SQziwAIrX3khWzaoBZtOSKqIOX1MVbUt/9yeTGp/KJbHaJPItIeqyrl14eLQ==","shasum":"a49f5a0aed408f6d0b57fc0b13de235f6171275b","tarball":"https://registry.npmjs.org/@calummm/simpledate/-/simpledate-0.0.3.tgz","fileCount":10,"unpackedSize":40687,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnN0dS/lRFgox2SrMdvl6bkHN6xvPCzgnV7m3vxswzvwIgE2EOo/sMMUqELcjjR2XNPjjlHhXTFEJsfKTZkZ3zNz8="}]},"_npmUser":{"name":"calummm","email":"calummm@gmail.com"},"directories":{},"maintainers":[{"name":"calummm","email":"calummm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simpledate_0.0.3_1684220004171_0.9730520387956338"},"_hasShrinkwrap":false},"0.0.4":{"name":"@calummm/simpledate","version":"0.0.4","description":"Simple date is focussed library. Unlike the native date implementation and many other date libraries, simpledate only cares about valid years, months and days. Simpledate is used when time and timezones do not matter, such as for validating birthday dates","types":"./dist/cjs/types/index.d.ts","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","exports":{".":{"import":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/types/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"clean":"rm -rf ./dist","build":"npm run clean && npm run build:esm && npm run build:cjs","build:esm":"tsc -p ./tsconfig.esm.json && cp dist/esm/index.js dist/esm/index.mjs","build:cjs":"tsc -p ./tsconfig.cjs.json","prepack":"npm run build","test":"vitest","coverage":"vitest run --coverage"},"author":"","license":"ISC","dependencies":{"esm":"^3.2.25"},"devDependencies":{"@vitest/coverage-c8":"^0.31.0","typescript":"^5.0.4","vitest":"^0.31.0"},"prettier":{"singleQuote":true},"gitHead":"017eda8f8dc82443a3ed99dd9516f3384d289c22","_id":"@calummm/simpledate@0.0.4","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-gNb6U9xE3ohOvVNT4Nc2Rm2piht/Evwt5MgAwYv1E65Ec0X13NYAI2JtfqLomvnstAdJjTQQZBpmBBVr0f4Itw==","shasum":"bc5ae348c7bda4c7bc7f9deb9c64f93b547a7bef","tarball":"https://registry.npmjs.org/@calummm/simpledate/-/simpledate-0.0.4.tgz","fileCount":10,"unpackedSize":49190,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZBQCXsG1JA+D3iIJH3o2ZoPMvgvCGGMjY5KewrX+ZRwIhAP+lmfRO/fCuh03Gu+iMVtd4zzRPCM3DmJczeJ3u6VQu"}]},"_npmUser":{"name":"calummm","email":"calummm@gmail.com"},"directories":{},"maintainers":[{"name":"calummm","email":"calummm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simpledate_0.0.4_1684417303734_0.6454287421030864"},"_hasShrinkwrap":false},"0.0.5":{"name":"@calummm/simpledate","version":"0.0.5","description":"Simpledate is a focused date library. Unlike the native date implementation and many other date libraries, Simpledate only cares about valid years, months and days. Simpledate is useful when time and timezones do not matter, such as for validating birthda","types":"./dist/cjs/types/index.d.ts","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","repository":{"type":"git","url":"git+https://github.com/calummm/simpledate.git"},"homepage":"https://github.com/calummm/simpledate#readme","bugs":{"url":"https://github.com/calummm/simpledate/issues"},"keywords":["date","simpledate","date formatting","date parsing","iso8601"],"exports":{".":{"import":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/types/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"clean":"rm -rf ./dist","build":"npm run clean && npm run build:esm && npm run build:cjs","build:esm":"tsc -p ./tsconfig.esm.json && cp dist/esm/index.js dist/esm/index.mjs","build:cjs":"tsc -p ./tsconfig.cjs.json","prepack":"npm run build","test":"vitest","coverage":"vitest run --coverage"},"author":"","license":"ISC","dependencies":{"esm":"^3.2.25"},"devDependencies":{"@vitest/coverage-c8":"^0.31.0","typescript":"^5.0.4","vitest":"^0.31.0"},"prettier":{"singleQuote":true},"gitHead":"bfcf01206246bec3abe892b3aeddf3c9833628f9","_id":"@calummm/simpledate@0.0.5","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-J1V+w7XI6Ddh4Q7I7zPN7p5Zbv9SZa6C3SsdBO+wh28ibWOOw7p4tgqa8TFM47u3ic7Oxkjlipj4tdVOto8ryQ==","shasum":"3092da458f747ce5969aafadfcd22bb2f2179140","tarball":"https://registry.npmjs.org/@calummm/simpledate/-/simpledate-0.0.5.tgz","fileCount":10,"unpackedSize":52635,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFyO+eeEKBNV+Krb4wcUaS3ypEuTAKcvWC5eRuwzIwSAIgePWg1EAivPiRgnT6/PfTXgfOGZ2dAk7nyFgI8pqjdMM="}]},"_npmUser":{"name":"calummm","email":"calummm@gmail.com"},"directories":{},"maintainers":[{"name":"calummm","email":"calummm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simpledate_0.0.5_1684739981303_0.6547357185617089"},"_hasShrinkwrap":false},"1.0.0":{"name":"@calummm/simpledate","version":"1.0.0","description":"[![Codecov Coverage](https://img.shields.io/codecov/c/github/calummm/simpledate/main.svg?style=flat-square)](https://codecov.io/gh/calummm/simpledate/)","types":"./dist/cjs/types/index.d.ts","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","repository":{"type":"git","url":"git+https://github.com/calummm/simpledate.git"},"homepage":"https://github.com/calummm/simpledate#readme","bugs":{"url":"https://github.com/calummm/simpledate/issues"},"keywords":["date","simpledate","date formatting","date parsing","iso8601"],"exports":{".":{"import":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/types/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"clean":"rm -rf ./dist","build":"npm run clean && npm run build:esm && npm run build:cjs","build:esm":"tsc -p ./tsconfig.esm.json && cp dist/esm/index.js dist/esm/index.mjs","build:cjs":"tsc -p ./tsconfig.cjs.json","prepack":"npm run build","test":"vitest","coverage":"vitest run --coverage","lint":"eslint . --ext .ts","format":"prettier . --write","prepare":"husky install"},"author":{"name":"Calummm"},"license":"ISC","devDependencies":{"@typescript-eslint/eslint-plugin":"^5.59.7","@typescript-eslint/parser":"^5.59.7","@vitest/coverage-c8":"^0.31.0","codecov":"^3.8.3","eslint":"^8.41.0","eslint-config-prettier":"^8.8.0","esm":"^3.2.25","husky":"^8.0.3","prettier":"^2.8.8","typescript":"^5.0.4","vitest":"^0.31.0"},"lint-staged":{"*.ts":["eslint --fix","prettier --write"]},"gitHead":"8470137f62d7657aa3f369b7d217f492bb4231bf","_id":"@calummm/simpledate@1.0.0","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-SFhCV8DAHQwBXXbDZyuKoTnxjWk3qT4ey3AHc9qAXlX3rQhTWGL2upTkOvWB7kqficWswfBniyO8e0Biqn8mOg==","shasum":"1addc9af381ecd93b946501cd7f91432fd4bdc00","tarball":"https://registry.npmjs.org/@calummm/simpledate/-/simpledate-1.0.0.tgz","fileCount":10,"unpackedSize":53757,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/mMKX0nVKtKP5LcKddsZzMrEw9+s2ciP+IGlrugU6KgIhAI4JG89kPDrmOKrdzuDwAZ2AvfbW1siVbVBHLR1cewoa"}]},"_npmUser":{"name":"calummm","email":"calummm@gmail.com"},"directories":{},"maintainers":[{"name":"calummm","email":"calummm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simpledate_1.0.0_1684821793066_0.2508470171813535"},"_hasShrinkwrap":false},"1.0.1":{"name":"@calummm/simpledate","version":"1.0.1","description":"Simpledate is a focused date library. Unlike the native date implementation and many other date libraries, Simpledate only cares about valid years, months and days. Simpledate is useful when time and timezones do not matter, such as for validating birthda","types":"./dist/cjs/types/index.d.ts","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","repository":{"type":"git","url":"git+https://github.com/calummm/simpledate.git"},"homepage":"https://github.com/calummm/simpledate#readme","bugs":{"url":"https://github.com/calummm/simpledate/issues"},"keywords":["date","simpledate","date formatting","date parsing","iso8601"],"exports":{".":{"import":{"types":"./dist/esm/types/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/types/index.d.ts","default":"./dist/cjs/index.js"}}},"scripts":{"clean":"rimraf ./dist","build":"npm run clean && npm run build:esm && npm run build:cjs","build:esm":"tsc -p ./tsconfig.esm.json && cp dist/esm/index.js dist/esm/index.mjs","build:cjs":"tsc -p ./tsconfig.cjs.json","prepack":"npm run build","test":"vitest","coverage":"vitest run --coverage","lint":"eslint . --ext .ts","format":"prettier . --write","prepare":"husky install"},"author":{"name":"Calummm"},"license":"ISC","devDependencies":{"@typescript-eslint/eslint-plugin":"^5.59.7","@typescript-eslint/parser":"^5.59.7","@vitest/coverage-c8":"^0.31.0","codecov":"^3.8.3","eslint":"^8.41.0","eslint-config-prettier":"^8.8.0","esm":"^3.2.25","husky":"^8.0.3","lint-staged":"^15.2.2","prettier":"^2.8.8","rimraf":"^5.0.5","typescript":"^5.0.4","vitest":"^0.31.0"},"lint-staged":{"*.ts":["eslint --fix","prettier --write"]},"_id":"@calummm/simpledate@1.0.1","gitHead":"c524cf347df1c19f6ae90202a4d85726eaef85a1","_nodeVersion":"20.10.0","_npmVersion":"10.2.5","dist":{"integrity":"sha512-0FByy7Q5mSIYoIDiJkIND1mBJTnq2LGgVStsfQ47LwFvlOSk7ZN+ShJ2MDJubts9rTHSOaTTqFqryoxkkpQHVQ==","shasum":"4aa148a3070a806782d71d2e391e4860d1c75d90","tarball":"https://registry.npmjs.org/@calummm/simpledate/-/simpledate-1.0.1.tgz","fileCount":3,"unpackedSize":4954,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIArXik8JECpkSwm/Tbl3pvb9F+ik19oaLJXKWDvbnYHrAiEAyVCJUUgVSqfArolhysoU5k3JoWW69sMiOF9GF+T+r5k="}]},"_npmUser":{"name":"calummm","email":"calummm@gmail.com"},"directories":{},"maintainers":[{"name":"calummm","email":"calummm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simpledate_1.0.1_1709549224756_0.878466192569435"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-15T04:31:16.538Z","0.0.1":"2023-05-15T04:31:16.711Z","modified":"2024-03-04T10:47:05.294Z","0.0.2":"2023-05-16T05:56:57.411Z","0.0.3":"2023-05-16T06:53:24.317Z","0.0.4":"2023-05-18T13:41:43.922Z","0.0.5":"2023-05-22T07:19:41.531Z","1.0.0":"2023-05-23T06:03:13.191Z","1.0.1":"2024-03-04T10:47:04.907Z"},"maintainers":[{"name":"calummm","email":"calummm@gmail.com"}],"description":"Simpledate is a focused date library. Unlike the native date implementation and many other date libraries, Simpledate only cares about valid years, months and days. Simpledate is useful when time and timezones do not matter, such as for validating birthda","license":"ISC","readme":"# 📅 Simple date [![Codecov Coverage](https://img.shields.io/codecov/c/github/calummm/simpledate/main.svg?style=flat-square)](https://codecov.io/gh/calummm/simpledate/)\n\nSimpledate is a focused date library. Unlike the native date implementation and many other date libraries, Simpledate only cares about valid years, months and days. Simpledate is useful when time and timezones do not matter, such as for validating birthday dates, outputting fixed dates for events and where multiple timezones simply do not matter.\n\nIt takes in common date patterns and encourages the use of an ISO date portion for transmitting date information between systems.\n\n- Uses native date functions internally to ensure consistency\n- Takes 1 based months to avoid common off-by-one month errors\n- Avoids arbitrary times and time offsets between systems\n- Provides immutable objects (cannot be modified, only cloned)\n- Allows easy comparisons between dates using convenience functions\n- Provides basic formatting to the most common legible formats\n\n## 💾 Installation\n\n```\n  npm install @calummm/simpledate --save\n```\n\n## 💻 Usage\n\n```javascript\nconst dateOne = new SimpleDate('9/06/2023');\n\nlet dateTwo = new SimpleDate('9/06/2023');\n\nconsole.log(dateOne.isOnOrBefore(dateTwo)); // true\n\ndateTwo = dateTwo.add(1, 'month');\n\nconsole.log(dateOne.isAfter(dateTwo)); // false\n\nconsole.log(dateOne.isAfter('10.10.2010')); // true\n\nconsole.log(new SimpleDate('29/02/2001').isValid); // false\n\nconsole.log(dateOne.iso); // '2023-06-09'\nconsole.log(dateOne.date); // Date Wed June 9 2023 10:00:00 GMT+1000 (AEST)\n\nconsole.log(dateOne.toFormat('iso')); // '2023-06-09'\nconsole.log(dateOne.toFormat('short')); // '09/06/2023'\nconsole.log(dateOne.toFormat('medium')); // '9 Jun 2023'\nconsole.log(dateOne.toFormat('long')); // '9 June 2023'\nconsole.log(dateOne.toFormat('isotime')); // '2023-06-09T00:00:00'\nconsole.log(dateOne.toFormat('isofull')); // '2023-06-09T00:00:00.000Z'\n\nconsole.log(new SimpleDate('🧀').toFormat('short', 'oops')); // 'oops'\n```\n","readmeFilename":"README.md","homepage":"https://github.com/calummm/simpledate#readme","keywords":["date","simpledate","date formatting","date parsing","iso8601"],"repository":{"type":"git","url":"git+https://github.com/calummm/simpledate.git"},"bugs":{"url":"https://github.com/calummm/simpledate/issues"},"author":{"name":"Calummm"}}