{"_id":"@bart-krakowski/get-week-info-polyfill","_rev":"12-a48ce14246c77521ebb0fc4efc71a32b","name":"@bart-krakowski/get-week-info-polyfill","dist-tags":{"latest":"1.0.8"},"versions":{"1.0.3":{"name":"@bart-krakowski/get-week-info-polyfill","version":"1.0.3","author":{"name":"Bart Krakowski","email":"bartlomiej@krakowski.dev"},"_id":"@bart-krakowski/get-week-info-polyfill@1.0.3","maintainers":[{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"}],"dist":{"shasum":"5928b7e42980b74afb7d1c98f5c2bf8e62227400","tarball":"https://registry.npmjs.org/@bart-krakowski/get-week-info-polyfill/-/get-week-info-polyfill-1.0.3.tgz","fileCount":16,"integrity":"sha512-Rg3nnpR1WuVNtL0A+OxdQpzHfMRNQOezJcYPZQ1XR8VdiefZZw8ea0MMjhfu13pELwsMRxZmsbmGYX5rJTN5WQ==","signatures":[{"sig":"MEYCIQD57eTj2gtrxePWb/PA/9rcZlF2ZCb0bzVE2VyipRA6eAIhAM+YR3OheXMxRqh+twDM4Z0Z6XzzS4COe+ZZIbKj8m0a","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":82455},"main":"dist/index.js","type":"module","gitHead":"f80a77e3c34b80f7e5c33460c277eede4cb98391","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"},"_npmVersion":"8.19.4","description":"This package provides a polyfill for the Intl.Locale API, adding the getWeekInfo method if it is not already available in the environment.","directories":{},"_nodeVersion":"16.20.2","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.3","typescript":"^5.5.3"},"_npmOperationalInternal":{"tmp":"tmp/get-week-info-polyfill_1.0.3_1720041360628_0.9014740957568588","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@bart-krakowski/get-week-info-polyfill","version":"1.0.4","author":{"name":"Bart Krakowski","email":"bartlomiej@krakowski.dev"},"_id":"@bart-krakowski/get-week-info-polyfill@1.0.4","maintainers":[{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"}],"dist":{"shasum":"c6d93ec2879b0dd747aec329d812777e5ec0917a","tarball":"https://registry.npmjs.org/@bart-krakowski/get-week-info-polyfill/-/get-week-info-polyfill-1.0.4.tgz","fileCount":16,"integrity":"sha512-xIJyefuthkQolgNdUWH3gTXU8CRTp6Z6ha08LR8t3d8uuicgzGgRaG5+OgCnjytIoFYXiVjFViffTTVzsaL67g==","signatures":[{"sig":"MEUCIE19v15X1mbELBYEvgfGuYO76EWkoid2aPwLhzd7RgppAiEAglei+s4jglVhfyoSPqCDMBw+Lv9JgqcAiy5Jk7oBkFg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":82051},"main":"dist/index.js","type":"module","gitHead":"ffebdc385e397e94e67b84f037deb9542c629cf6","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"},"_npmVersion":"8.19.4","description":"This package provides a polyfill for the Intl.Locale API, adding the getWeekInfo method if it is not already available in the environment.","directories":{},"_nodeVersion":"16.20.2","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.3","typescript":"^5.5.3"},"_npmOperationalInternal":{"tmp":"tmp/get-week-info-polyfill_1.0.4_1720082556198_0.8577197805008507","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@bart-krakowski/get-week-info-polyfill","version":"1.0.5","author":{"name":"Bart Krakowski","email":"bartlomiej@krakowski.dev"},"_id":"@bart-krakowski/get-week-info-polyfill@1.0.5","maintainers":[{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"}],"dist":{"shasum":"b4c46f46b4749b70718bfc9316a8f9339a3a92d6","tarball":"https://registry.npmjs.org/@bart-krakowski/get-week-info-polyfill/-/get-week-info-polyfill-1.0.5.tgz","fileCount":16,"integrity":"sha512-TE6yg50I2W0/EJ43OAD76TNleubb/P3w8DcxsGlUZIJNODtBjyqXyxyaj9vwiftb288TBl7Sfst2alNHSp4PCQ==","signatures":[{"sig":"MEUCIQCQs2P6gmL2PMj75r87QC0/IqttUkV0eEnJEa+v/CNiDgIgHzLwihMKTmpyX3Zd1FqqGXpCITLjNLoYoRLpkQn++ZY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":82080},"main":"dist/index.js","type":"module","types":"src/index.d.ts","gitHead":"55ff659d9e6d65cc2988b81360ea539079edf65c","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"},"_npmVersion":"8.19.4","description":"This package provides a polyfill for the Intl.Locale API, adding the getWeekInfo method if it is not already available in the environment.","directories":{},"_nodeVersion":"16.20.2","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.3","typescript":"^5.5.3"},"_npmOperationalInternal":{"tmp":"tmp/get-week-info-polyfill_1.0.5_1721393681852_0.11635882731260216","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@bart-krakowski/get-week-info-polyfill","version":"1.0.6","author":{"name":"Bart Krakowski","email":"bartlomiej@krakowski.dev"},"_id":"@bart-krakowski/get-week-info-polyfill@1.0.6","maintainers":[{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"}],"dist":{"shasum":"8d94c4e5ccfb3aaa411166ebdae9f04d872fbfca","tarball":"https://registry.npmjs.org/@bart-krakowski/get-week-info-polyfill/-/get-week-info-polyfill-1.0.6.tgz","fileCount":16,"integrity":"sha512-5xtCRlYCetR4rvhmpmS+6XbthIOBBYQqi9vW0fDpUI44BZ/gLuNx2VTDybldFff0a/9xeXbb/Tknz0fBS2kF4g==","signatures":[{"sig":"MEQCIDBnuGBJuqgW+EXNp70yHZxuV99fMH5cSMPyTRYEmtaVAiA8gXYD1PBLei1UqPMJ5CXn8qtaWJBbMtgH7eST5xkitw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":82113},"main":"dist/index.js","type":"module","types":"src/index.d.ts","gitHead":"a86a743f570250b66fe70a71e1da0f9daa43b5ca","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"},"_npmVersion":"8.19.4","description":"This package provides a polyfill for the Intl.Locale API, adding the getWeekInfo method if it is not already available in the environment.","directories":{},"_nodeVersion":"16.20.2","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.3","typescript":"^5.5.3"},"_npmOperationalInternal":{"tmp":"tmp/get-week-info-polyfill_1.0.6_1721511092727_0.9564435498339938","host":"s3://npm-registry-packages"}},"1.0.7":{"name":"@bart-krakowski/get-week-info-polyfill","version":"1.0.7","author":{"name":"Bart Krakowski","email":"bartlomiej@krakowski.dev"},"_id":"@bart-krakowski/get-week-info-polyfill@1.0.7","maintainers":[{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"}],"dist":{"shasum":"9eb72a8805f74b62d16dfc50b44926fbfe4e24d8","tarball":"https://registry.npmjs.org/@bart-krakowski/get-week-info-polyfill/-/get-week-info-polyfill-1.0.7.tgz","fileCount":16,"integrity":"sha512-p7E6HwsaJl4AAjDhIzC4i39wskl2Ig3pEn0MnSwgZwT4Prf86baFGpGpk5gGJYne4kkegMeKObx3m4+T28iZIQ==","signatures":[{"sig":"MEQCIG71THvCuD8mL+UAU+4iofYt32YHmWoy19Sn9UY6o+iqAiANP8TudjTn8WfyRpW4IpzQuUfwUAXGUQ9PgOWceeCbNQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127664},"main":"dist/index.js","type":"module","types":"src/index.d.ts","gitHead":"3db808ca252c2210127b82ed90b54365a9a3bd77","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"},"_npmVersion":"8.19.4","description":"This package provides a polyfill for the Intl.Locale API, adding the getWeekInfo method if it is not already available in the environment.","directories":{},"_nodeVersion":"16.20.2","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.3","typescript":"^5.5.3"},"_npmOperationalInternal":{"tmp":"tmp/get-week-info-polyfill_1.0.7_1722195159922_0.7044595354140935","host":"s3://npm-registry-packages"}},"1.0.8":{"name":"@bart-krakowski/get-week-info-polyfill","types":"src/index.d.ts","author":{"name":"Bart Krakowski","email":"bartlomiej@krakowski.dev"},"main":"dist/index.js","version":"1.0.8","type":"module","scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview"},"devDependencies":{"typescript":"^5.5.3","vite":"^5.3.3"},"gitHead":"9e7c3cb509b9f997a68b6c3b509003da8a9b9741","description":"This package provides a polyfill for the Intl.Locale API, adding the getWeekInfo method if it is not already available in the environment.","_id":"@bart-krakowski/get-week-info-polyfill@1.0.8","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-Vkp5Skl44AkQ/w+pJ1XrCa5P5whvpK7Ix75KBoZXpGXOEp6CqLVkcAQaWfzY6+rF1R+2cwvJMkxkYF3M4B8HFw==","shasum":"c3474e5345ab82962968a52f104d51cb0f821d15","tarball":"https://registry.npmjs.org/@bart-krakowski/get-week-info-polyfill/-/get-week-info-polyfill-1.0.8.tgz","fileCount":16,"unpackedSize":128606,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3VeDmx+Z2RGg4XErttTCU6sFSs/vwArS+46LdCedkUAIgeYckH0GhNGbkVQyOkXOixJNiPL4E+HX/9jzESobynFs="}]},"_npmUser":{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"},"directories":{},"maintainers":[{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-week-info-polyfill_1.0.8_1722520252580_0.9751715561248007"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-03T21:16:00.498Z","modified":"2024-08-01T13:50:52.947Z","1.0.0":"2024-07-03T20:40:24.715Z","1.0.1":"2024-07-03T20:56:13.668Z","1.0.2":"2024-07-03T21:00:50.400Z","1.0.3":"2024-07-03T21:16:00.838Z","1.0.4":"2024-07-04T08:42:36.354Z","1.0.5":"2024-07-19T12:54:42.029Z","1.0.6":"2024-07-20T21:31:32.883Z","1.0.7":"2024-07-28T19:32:40.076Z","1.0.8":"2024-08-01T13:50:52.755Z"},"author":{"name":"Bart Krakowski","email":"bartlomiej@krakowski.dev"},"description":"This package provides a polyfill for the Intl.Locale API, adding the getWeekInfo method if it is not already available in the environment.","maintainers":[{"name":"bart_krakowski","email":"bartlomiej@krakowski.dev"}],"readme":"# `Intl.Locale.prototype.getWeekInfo()` polyfill\n\nThis package provides a polyfill for the Intl.Locale API, adding the getWeekInfo method if it is not already available in the environment.\n\n## Installation\n\n```sh\nnpm install @bart-krakowski/get-week-info-polyfill\n```\n\n## Usage\n\n```js\nrequire('@bart-krakowski/get-week-info-polyfill')\n\nconst he = new Intl.Locale('he') // Hebrew (Israel)\nconsole.log(he.getWeekInfo()) // { firstDay: 7, weekend: [5, 6], minimalDays: 1 }\n\nconst af = new Intl.Locale('af') // Afrikaans (South Africa)\nconsole.log(af.getWeekInfo()) // { firstDay: 7, weekend: [6, 7], minimalDays: 1 }\n\nconst enGB = new Intl.Locale('en-GB') // English (United Kingdom)\nconsole.log(enGB.getWeekInfo()) // { firstDay: 1, weekend: [6, 7], minimalDays: 4 }\n\nconst arAF = new Intl.Locale('ar-AF') // Arabic (Afghanistan)\nconsole.log(arAF.getWeekInfo()) // { firstDay: 6, weekend: [4, 5], minimalDays: 1 }\n\nconst dvMV = new Intl.Locale('dv-MV') // Divehi (Maldives)\nconsole.log(dvMV.getWeekInfo()) // { firstDay: 5, weekend: [6, 7], minimalDays: 1 }\n```\n\n## API\n\n`Intl.Locale.prototype.getWeekInfo` returns an object containing week information for the locale.\n\n### Returns:\n\n- `WeekInfo`\n  An object with the following properties:\n  - `firstDay (number)`\n    An integer between 1 (Monday) and 7 (Sunday) indicating the first day of the week for the locale. Commonly 1, 5, 6, or 7.\n  - `weekend (number[])`\n    An array of integers between 1 and 7 indicating the weekend days for the locale. This is usually continuous because UTS 35 stores weekendStart and weekendEnd instead.\n  - `minimalDays (number)`\n    An integer between 1 and 7 (commonly 1 and 4) indicating the minimal days required in the first week of a month or year, for week-of-year or week-of-month calculations (e.g. The 20th week of the year). For example, in the [ISO 8601 calendar](https://en.wikipedia.org/wiki/ISO_8601), the first week of a year must have at least 4 days in this year, so if January 1 is a Friday, Saturday, or Sunday, it will be numbered as part of the last week of the previous year.\n","readmeFilename":"README.md"}