{"_id":"@skolacode/calendar-js","_rev":"7-6003dfc2d38833907f7965be12f53312","name":"@skolacode/calendar-js","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@skolacode/calendar-js","version":"1.0.0","description":"Simple JavaScript calendar generator","main":"lib/index.js","types":"lib/index.d.ts","directories":{"lib":"lib"},"devDependencies":{"@types/jest":"^28.1.6","jest":"^28.1.3","prettier":"^2.7.1","ts-jest":"^28.0.7","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.7.4"},"scripts":{"test":"jest --config jestconfig.json","build":"tsc","format":"prettier --write \"src/**/*.ts\"","lint":"tslint -p tsconfig.json","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+ssh://git@github.com/skolacode/calendar-js.git"},"keywords":["javascript","calendar","react","reactjs","react-native","vue","vuejs","typescript","generator","date"],"author":{"name":"Ahmad Ibrahim"},"license":"ISC","bugs":{"url":"https://github.com/skolacode/calendar-js/issues"},"homepage":"https://github.com/skolacode/calendar-js#readme","gitHead":"b8e5c0df5fffeaa4818818f4f7059dd9e92c89f2","_id":"@skolacode/calendar-js@1.0.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-UUhs56QUfYIi5kNLrVz3FG56gDYdVKXCr8x9FFmaAMESeNVwTZvlh4PEX+FvqgUCeQQTVyRa78MYa48tDCUApQ==","shasum":"692d0a4525271c69415c8b05281558ccf4c37b3b","tarball":"https://registry.npmjs.org/@skolacode/calendar-js/-/calendar-js-1.0.0.tgz","fileCount":8,"unpackedSize":10630,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNtiisup+yKag+CQvAGfCOzCnVZSjBXQ0jJBdBToXewAIgNtTvmRKh73HfBXGxuWmB6D+EHopu2JUxd8UT5a0bIlQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4AYeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRxA/+IYtt28uVWeMLqzVe6l8wjV2UxjfRTjsejS+JXlYSvYD5qnUk\r\n8RlXeg7+YZvf0p8QJsNNB5OAla87cplvW2ONkGR9bINr/0JFPErgHe9jHY8L\r\nMqtPk/vVSTWtmjAMbWWbS3Y0VdsD6wIjI+6xRHEuGlgUUyRvkZtYPDe3KJAf\r\nyawQjm0D0rMXzUY2DYvOpgcmKhIuglQJ+PTeS6oxb4dpviLwDdJ+0/aiiI2p\r\nWndiEzX9XGTodir9t0Hx2lJS5HCYDIn/YVFv2qyssCjDTVnEMNWVAa7w16c0\r\nFFyTYT1W5UhryBH325xb2+cyLl0ZSrzKvZh14xDjCVOz0Mt7EHH/cB5IKBwk\r\nUDyIh1ANdfjVVSAAoFueFXUlM2TBnh+X85xxBCJjs8xGURtO/NwkHsqQ/PS2\r\n0kdNryM/jPnRn5ZOU2WScdAW10hK30o5VaT6luzT0oED14AZkKnZr+wXDd54\r\nYrriFggq1Keeh1Cc/SpYnewvBq09YHMhZs95i+DYIjQ/GKve9Z5I7SHbWVJh\r\nPeR0dedxCrlw7ROCsoPWRaJv9YD5T1o3fi0tTX49t1TlXOlp/Pzp0DIGRZ+f\r\nuKelpFV1heauO+c4tZ8zVcQhUv7ayGTlxizyljFQXYCPwyH1oHbFT5id5Lax\r\nw5//fYLLrcJfqk+1ETe7mgTV5uXQXRjA20c=\r\n=Kps7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"skolacode","email":"skolacode@gmail.com"},"maintainers":[{"name":"skolacode","email":"skolacode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/calendar-js_1.0.0_1658848798146_0.5320681045780153"},"_hasShrinkwrap":false},"1.0.1":{"name":"@skolacode/calendar-js","version":"1.0.1","description":"Simple JavaScript calendar generator","main":"lib/index.js","types":"lib/index.d.ts","directories":{"lib":"lib"},"devDependencies":{"@types/jest":"^28.1.6","jest":"^28.1.3","prettier":"^2.7.1","ts-jest":"^28.0.7","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.7.4"},"scripts":{"test":"jest --config jestconfig.json","build":"tsc","format":"prettier --write \"src/**/*.ts\"","lint":"tslint -p tsconfig.json","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+ssh://git@github.com/skolacode/calendar-js.git"},"keywords":["javascript","calendar","react","reactjs","react-native","vue","vuejs","typescript","generator","date"],"author":{"name":"Ahmad Ibrahim"},"license":"ISC","bugs":{"url":"https://github.com/skolacode/calendar-js/issues"},"homepage":"https://github.com/skolacode/calendar-js#readme","gitHead":"7226f092f754e43ce7e3741391ceb96aa7169430","_id":"@skolacode/calendar-js@1.0.1","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-dpQfJPrc2INbtesIkhCAlHo7SvERytjNVAoTRAPSA2QvLk/V0RUE4MS43Sr2ovCMFnJOtVpp6H3hg44BT4/MXg==","shasum":"1104723cb93ef0b843e830a5b15a89b47066775f","tarball":"https://registry.npmjs.org/@skolacode/calendar-js/-/calendar-js-1.0.1.tgz","fileCount":8,"unpackedSize":10224,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDt226XcRCVpXii1WlOYyVWRHhViS2dm1GBrRRJTAx5lwIhAJO4Q9ajvvE80cNswxH3PB14qWNmvvTgXpDbtRPgZLnI"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjtjAXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoY1A/+O7fFXwXuSgVO83mKYBzI71Tr+49Ytw+7YJ3/bnzJdfepB0ia\r\nYS7du79UUQ0kY8Mk9ZNxepqTWKFQX4ZVPEfVuT+dotnntaICV8O7EsGXKhbP\r\n9yoFya04zFCIGUnm1CiLKrmn13HcC60Xu8jONm4W27VuitLSk2CuJBC0K3FR\r\nOoKiVVoGWLvGANFaM+H6EFJ7YGYMiOTg6uhd70eIMe0MdbyYfhjs6tg8ft8f\r\nG7Nyt0J9Uj8ZV6s5sPIJG0xb6z/HQ+MUmsJIVc0g/Hmb+vd8Rv5+t4xwiFyQ\r\niLxZfsboGrHhfTjiTgNyxcY2Seo6hV7M0lh3oLW8tY/93G1mv6ghX07HtEsQ\r\n6eoqPSPlYSItkGzl4yGbB7Cx+zgVDD8LpSSSu/nHu80J2Sp9h9mjS2+usVq9\r\nj/zSSxya0jOtps2X72ok7mLw4JDFkVbH8SSvX7kYffAdnYjO3F3uWl7OZofQ\r\njnXVi6+6dsDNpEwSifjpQEz9D0HBMlWCgX0l64lvFXbK5KKsNgSD6ZtwhFMN\r\nEcCpOwuVH/IMdf1NlSap1SzdjLbe1IXxCvSbBLfxHYhPoiGFyyOAWWVaVESX\r\n3akiPIXs92RRofs2b6uUicGe6fbnWpdQjugpWwEvXXjQxyFiXz7iyjrxoaBz\r\nIot2aprm8xmLGm7k1IaUwSovS9ElRFw0Rss=\r\n=G7r7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aibrahim3546","email":"aibrahim3546@gmail.com"},"maintainers":[{"name":"burhan3759","email":"bern2727@gmail.com"},{"name":"merekata","email":"mereka_ta@yahoo.com"},{"name":"aibrahim3546","email":"aibrahim3546@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/calendar-js_1.0.1_1672884247777_0.833157773315153"},"_hasShrinkwrap":false},"1.0.2":{"name":"@skolacode/calendar-js","version":"1.0.2","description":"Simple JavaScript calendar generator","main":"lib/index.js","types":"lib/index.d.ts","directories":{"lib":"lib"},"devDependencies":{"@types/jest":"^28.1.6","jest":"^28.1.3","prettier":"^2.7.1","ts-jest":"^28.0.7","tslint":"^6.1.3","tslint-config-prettier":"^1.18.0","typescript":"^4.7.4"},"scripts":{"test":"jest --config jestconfig.json","build":"tsc","format":"prettier --write \"src/**/*.ts\"","lint":"tslint -p tsconfig.json","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+ssh://git@github.com/skolacode/calendar-js.git"},"keywords":["javascript","calendar","react","reactjs","react-native","vue","vuejs","typescript","generator","date"],"author":{"name":"Ahmad Ibrahim"},"license":"ISC","bugs":{"url":"https://github.com/skolacode/calendar-js/issues"},"homepage":"https://github.com/skolacode/calendar-js#readme","gitHead":"4a374ad59abc831d9dae23073e091457924bd3b0","_id":"@skolacode/calendar-js@1.0.2","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-Or1wg1I0bvX6RcT0rfvWGiyrm4LJtHEo4veC2z3NsYnGB+X2viq4ghB3A8FlSnfjL3A/IqwiQEry+VHlTsYWvw==","shasum":"1946097bb9db134f881dc7204a8fadab4d246746","tarball":"https://registry.npmjs.org/@skolacode/calendar-js/-/calendar-js-1.0.2.tgz","fileCount":8,"unpackedSize":13202,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICSFL2fLiZbPPcTw+e3YR0oqjnbu6rvQdHgqHJuS2gZHAiEAi33bLGQSQeL7wyZTUOt9bCmgPwPM8aVMdR3nXPUHwXw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjx3RDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqaRA/7B3v1dawSQ4ME8PAXJZ3K+sSCLNkP7KNo9gsMOimoCU0fK7Ga\r\n2OflT3aarHLOCrJD6Wj/YWvdj9YZhysE68QW86dVTNGzUOskemNxzHwWKnrp\r\nahk0tLKYenH7bVVCz3mWVQgHccdOZQqIHuuzupFML5xHiJmnsGMESM7nLHGp\r\nUPRO5NQ6G219uQq7TW90e5YUyzis+tla1kMcfYnc5y6WwQACSQ5ogLg0xGt3\r\nzo2UFC9H9QL/wE80DzFDdfs44vj7UVCq7ZLyX80RW/Ti+S8ASmbG3BGoUUju\r\nGXhZNKdk80HO+v/n4frOd1IhYlHaqOTc/LrobFkCoZSaqcYUBukGyYdhTdfJ\r\nf+XwJHKzERxiKKhCDvXeBIuBEKTW8HJdWl4pcJxGJ1scsfZFFBDPg+OVBrWA\r\ntlg+cUfpG/aoKfmcOiEuG18XrFzefXW8GII9ddCRiRK99x7aF/A9Dh8nzmNW\r\nlFMLbHDgz2f+xe9DpxzgV2adoTzIFjgX9p5ii6r8HBZxoydZ5UMCqqV6RDsI\r\nkrSwTGeYiZxOjW+7kbPQtFa630mvCJdYQfmabvB3mlQ+kozGvYXni9NH0pKj\r\nVI4SMlpcqNvT7EKXKxkYFGK37Ovs3/fnu0V6yM+s9asWkrhpCdJLfJqovkjL\r\n9g03ZotcWKKlYUWNAVWWzPOMxMT6vPc0MLQ=\r\n=+xqz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aibrahim3546","email":"aibrahim3546@gmail.com"},"maintainers":[{"name":"burhan3759","email":"bern2727@gmail.com"},{"name":"merekata","email":"mereka_ta@yahoo.com"},{"name":"aibrahim3546","email":"aibrahim3546@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/calendar-js_1.0.2_1674015811050_0.5756783893097717"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-26T15:19:58.090Z","1.0.0":"2022-07-26T15:19:58.308Z","modified":"2023-01-18T04:23:31.353Z","1.0.1":"2023-01-05T02:04:07.948Z","1.0.2":"2023-01-18T04:23:31.226Z"},"maintainers":[{"name":"burhan3759","email":"bern2727@gmail.com"},{"name":"merekata","email":"mereka_ta@yahoo.com"},{"name":"aibrahim3546","email":"aibrahim3546@gmail.com"}],"description":"Simple JavaScript calendar generator","homepage":"https://github.com/skolacode/calendar-js#readme","keywords":["javascript","calendar","react","reactjs","react-native","vue","vuejs","typescript","generator","date"],"repository":{"type":"git","url":"git+ssh://git@github.com/skolacode/calendar-js.git"},"author":{"name":"Ahmad Ibrahim"},"bugs":{"url":"https://github.com/skolacode/calendar-js/issues"},"license":"ISC","readme":"## CalendarJS [![NPM link](https://img.shields.io/badge/%40skolacode%2Fcalendar--js-npm-red)](https://www.npmjs.com/package/@skolacode/calendar-js)\n\n> A simple and light weight JavaScript calendar generator.\n\n### Installation\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save @skolacode/calendar-js\n```\n\nInstall with [yarn](https://yarnpkg.com):\n\n```sh\n$ yarn add @skolacode/calendar-js\n```\n\n### Usage\n\n```\nimport { getCalendar } from '@skolacode/calendar-js'\n\nconst july2022Calendar = getCalendar(6, 2022)\n\nconsole.log(july2022Calendar)\n\n/**\nresponse:\n{\n  calendar: [\n    [\n      {\n        date: 2022-06-25T16:00:00.000Z,\n        day: 26,\n        weekday: 'Sunday',\n        isCurrentMonth: false\n      },\n      ...\n    ],\n    [...],\n    ....\n  month: 6,\n  year: 2022,\n  next: { month: 7, year: 2022 },\n  previous: { month: 5, year: 2022 }\n}\n*/\n```\n\n### Methods\n\n**getCalendar(month: number, year: number, options?: [IOptions](#types)): [ICalendar](#types)**\n\nParameters\n\n| Name        | Type   | Required | Default | Description                                                    |\n| ----------- | ------ | -------- | ------- | -------------------------------------------------------------- |\n| month       | Number | Yes      | -       | The month of the calendar (0 to 11). 0 = January, 1 = February |\n| year        | Number | Yes      | -       | The year of the calendar                                       |\n| options.startingDay | [TStartingDay](#types) | No       | 1       | The starting day of the week (0 to 6). 0 = Sunday, 1 = Monday  |\n| options.extraWeek | Boolean | No       | true       | Calendar rows are fixed to 6 regardless of all the 6th week consists of days for next month  |\n\n---\n\n**daysInMonth(month: number, year: number): number**\n\nReturn the total number of days in a month.\n\nParameters\n\n| Name  | Type   | Required | Default | Description                                                    |\n| ----- | ------ | -------- | ------- | -------------------------------------------------------------- |\n| month | Number | Yes      | -       | The month of the calendar (0 to 11). 0 = January, 1 = February |\n| year  | Number | Yes      | -       | The year of the calendar                                       |\n\n### Types\n\n```jsx\ntype TWeekdays = 'Sunday' | 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday';\n\ntype TDate = {\n  date: Date,\n  day: number,\n  isCurrentMonth: boolean,\n  weekday: TWeekdays,\n};\n\ninterface ICalendar {\n  calendar: TDate[][];\n  month: number;\n  year: number;\n  next: {\n    month: number,\n    year: number,\n  };\n  previous: {\n    month: number,\n    year: number,\n  };\n}\n\nexport type TStartingDay = 0 | 'SUNDAY' | 'Sunday' | 'sunday' | 1 | 'MONDAY' | 'Monday' | 'monday' | 2 | 'TUESDAY' | 'Tuesday' | 'tuesday' | 3 | 'WEDNESDAY' | 'Wednesday' | 'wednesday' | 4 | 'THURSDAY' | 'Thursday' | 'thursday' | 5 | 'FRIDAY' | 'Friday' | 'friday' | 6 | 'SATURDAY' | 'Saturday' | 'saturday';\n\nexport interface IOptions {\n  startingDay?: TStartingDay | number;\n  extraWeek?: boolean;\n}\n```\n\n### Contributing\n\nPull Request:\n\n- Fork this repo\n- Create new branch for bug fixes or new feature\n- Create/update test files\n- Make sure build run successfully\n\nContribution are always open. Report issues or feature requests on [GitHub Issues](https://github.com/skolacode/calendar-js/issues)\n","readmeFilename":"README.md"}