{"_id":"@anon-phantom/hijri","name":"@anon-phantom/hijri","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@anon-phantom/hijri","version":"0.0.1","description":"This is a modified version of moment-jalaali by Behrang Noruzi Niya and extends Suhail Alkowaileet's work on moment-hijri.js lib","license":"MIT","main":"index.js","source":"index.js","types":"./typings/index.d.ts","typings":"./index.d.ts","engines":{"node":">=18.6.0"},"sideEffects":false,"scripts":{"publish":"npm publish --access=public"},"author":{"name":"Ahmed Sulaimani","email":"ahmed.sulaimani@hotmail.com","url":"https://gobeyound.com"},"bugs":{"url":"https://github.com/anon-phantom/hijri/issues"},"homepage":"https://github.com/anon-phantom/hijri#readme","repository":{"type":"git","url":"git+https://github.com/anon-phantom/hijri.git"},"keywords":["@anon-phantom/hijri","@anon-phantom"],"peerDependencies":{"@types/react":"^18.2.14","react":"^18.2.0","react-dom":"^18.2.0","prop-types":"^15.8.1"},"peerDependenciesMeta":{"@types/react":{"optional":true}},"gitHead":"3f5672ac0e5ad14720c295fb4655775fc24d4049","_id":"@anon-phantom/hijri@0.0.1","_nodeVersion":"18.6.0","_npmVersion":"9.7.2","dist":{"integrity":"sha512-K3yCXpUwwn9RNivWb5HAp40qGNZK2Kbpoq3f9CBVqYDJ9TfUAisZc+CgS+oOFRZIFsr9/qgktiCmyvB3Xsg77g==","shasum":"e75de550cbc2709facfc30954101f2da7fe33043","tarball":"https://registry.npmjs.org/@anon-phantom/hijri/-/hijri-0.0.1.tgz","fileCount":16,"unpackedSize":222384,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLF7xqnYeA1/9o5htU2Ts44SUkEXy2K2eEt806TxhgaAIgbdQDbxIpnixyLyIBG9trePx+S7iPQSwPvJz0OcqENtI="}]},"_npmUser":{"name":"anon-phantom","email":"0x01.phantom@gmail.com"},"directories":{},"maintainers":[{"name":"anon-phantom","email":"0x01.phantom@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hijri_0.0.1_1688710754803_0.34718969494696506"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-07T06:19:14.740Z","0.0.1":"2023-07-07T06:19:15.012Z","modified":"2023-07-07T06:19:15.167Z"},"maintainers":[{"name":"anon-phantom","email":"0x01.phantom@gmail.com"}],"description":"This is a modified version of moment-jalaali by Behrang Noruzi Niya and extends Suhail Alkowaileet's work on moment-hijri.js lib","homepage":"https://github.com/anon-phantom/hijri#readme","keywords":["@anon-phantom/hijri","@anon-phantom"],"repository":{"type":"git","url":"git+https://github.com/anon-phantom/hijri.git"},"author":{"name":"Ahmed Sulaimani","email":"ahmed.sulaimani@hotmail.com","url":"https://gobeyound.com"},"bugs":{"url":"https://github.com/anon-phantom/hijri/issues"},"license":"MIT","readme":"# @fin-x/hijri\n\n> This is a modified version of moment-jalaali by Behrang Noruzi Niya and extends Suhail Alkowaileet's work on moment-hijri.js lib\n\n## Install\n\n```bash\nnpm install --save @fin-x/hijri\n```\n\n## Usage\n\n```jsx\nimport React from 'react'\nimport moment from '@fin-x/hijri'\n\nexport default function HijriTable() {\n    return (\n        <table>\n            <thead>\n              <tr>\n                <td>Date in Hijri</td>\n                <td>Month Name/Number</td>\n                <td>Hijri to Gregorian</td>\n                <td>Month Name/Number</td>\n                <td>strict parsing</td>\n              </tr>\n            </thead>\n            {[6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5].map((x) => {\n                const date = moment(`1444-${x}-08`, 'iYYYY-iM-iD', false)\n                const strict = moment(`1444-${x}-08`, 'iYYYY-iM-iD', true)\n                const fH = date.format('iDD-iMM-iYYYY')\n                const fG = date.format('DD-MMMM-YYYY')\n                const ffH = moment(date).format('iMMMM')\n                const sffG = moment(strict).format('MMMM')\n                return (\n                  <tbody key={x}>\n                    <tr>\n                        <td>{fH}</td>\n                        <td>{ffH}</td>\n                        <td>{fG}</td>\n                        <td>{sffG}</td>\n                        <td>false / true</td>\n                    </tr>\n                  </tbody>\n                )\n            })}\n            {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((x) => {\n                const date = moment(`01-${x}-1990`, 'D-M-YYYY', false)\n                const strict = moment(`01-${x}-1990`, 'D-M-YYYY', true)\n                const fH = date.format('iDD-iMMMM-iYYYY')\n                const fG = date.format('DD-MMMM-YYYY')\n                const sffH = moment(strict).format('iMM')\n                const ffG = moment(date).format('MM')\n                return (\n                  <tbody key={x}>\n                      <tr>\n                          <td>{fH}</td>\n                          <td>{sffH}</td>\n                          <td>{fG}</td>\n                          <td>{ffG}</td>\n                          <td>true / false</td>\n                      </tr>\n                  </tbody>\n                )\n            })}\n        </table>\n    )\n}\n\n```\n\n```js\nvar moment = require('@fin-x/hijri')\n\nconst hijriDate = moment(`1424-12-17`, 'iYYYY-iM-iD', true)\nconst gregorianDate = moment(`1990-07-09`, 'YYYY-M-D', true)\nconsole.log(\"Hijri Format\", gregorianDate.format('iDD-iMM-iYYYY'))\nconsole.log(\"Gregoria Format\", hijriDate.format('DD-MM-YYYY'))\n\n// node .\\index.js\n// Hijri Format ١٧-١٢-١٤١٠\n// Gregoria Format ٠٨-٠٢-٢٠٠٤\n\n```\n\n## License\n\nMIT © [anon-phantom](https://github.com/anon-phantom/hijri)\n","readmeFilename":"README.md"}