{"_id":"@ashgkwd/moment-hijri","_rev":"1-5fba7884f2dcf622edc2cc4ba730d5dd","name":"@ashgkwd/moment-hijri","dist-tags":{"latest":"2.1.1"},"versions":{"2.1.1":{"name":"@ashgkwd/moment-hijri","version":"2.1.1","description":"A Hijri calendar (Based on Umm al-Qura calculations) plugin for moment.js.","author":{"name":"Suhail Alkowaileet","email":"xsoh.k7@gmail.com"},"license":"MIT","keywords":["hijri","hijriah","arabic","lunar","Umm al-Qura","date","calendar","conversion","convert"],"main":"moment-hijri.js","scripts":{"test":"grunt test","prepublish":"grunt test"},"homepage":"https://github.com/xsoh/moment-hijri","bugs":{"url":"https://github.com/xsoh/moment-hijri/issues"},"repository":{"type":"git","url":"git://github.com/xsoh/moment-hijri.git"},"devDependencies":{"mocha":"~5.2.0","chai":"~4.1.2","grunt":"~1.0.2","grunt-cli":"^1.2.0","grunt-contrib-watch":"^1.1.0","grunt-contrib-uglify":"^3.3.0","grunt-contrib-jshint":"^1.1.0","grunt-shell":"^2.1.0","bower":"^1.8.4"},"dependencies":{"moment":"^2.22.1"},"jshintConfig":{"camelcase":true,"eqeqeq":true,"forin":true,"freeze":true,"immed":true,"indent":2,"latedef":"nofunc","newcap":true,"noarg":true,"noempty":true,"nonew":true,"plusplus":true,"quotmark":true,"undef":true,"unused":true,"strict":true,"trailing":true,"asi":true,"eqnull":true,"laxbreak":true,"laxcomma":true,"node":true},"gitHead":"2d69b10be89374cd54a883d94a503a8f02ac52b3","_id":"@ashgkwd/moment-hijri@2.1.1","_npmVersion":"5.6.0","_nodeVersion":"9.10.1","_npmUser":{"name":"ashgkwd","email":"ash.gkwd@gmail.com"},"dist":{"integrity":"sha512-tqCDPKNzOJ8n7tzmorixZIWteKdSPKZBgRe3a21OKZ6/S7Eng7bmEVtxb4JJ54mb38ZxSZYh5/9dcCdYuPmspA==","shasum":"10a3ad4ec35e7b1bf9eef9438e9d99ef2fedf72f","tarball":"https://registry.npmjs.org/@ashgkwd/moment-hijri/-/moment-hijri-2.1.1.tgz","fileCount":10,"unpackedSize":65263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/7plCRA9TVsSAnZWagAALNMP/17xfxs6JGhibXXIYWFn\nNK54v1ueWdWbezKDUuwo+izi7StzEGjC4GAJ7P0INAIc1CpPcWJY5a4kLFBn\njUAGEEQEVIDXI5JqKUKqeuODJGpezBCfTmRzy4UF3SBzDBw/34+0EmPfEXaU\nZs0dORGAtaVHeuztHvGU5iVdW5LStcD03SRLkxJ9KsonpC6Z1Nu+i6ZyJsT7\n4faVFPcm2gn6WEf4PYqwwajNQ8T6Kzcz9opFg91jhl3n+vR/7yqjv1a5u21Q\n/345KmUQDqi2dstE1q/70XIn7G5o3ie9x3J/eACXEqRA4IwqmjmtpaCaRFhi\nz6mQ5HWAzNA0OA1Ta85qMNQDAlHcZIAGcCSLEHixoX/5d5zPZGFVPfz7Fdiu\n27ferfuVntPt+gItNMc6T8ahiqbUWKt8S2doCLusDB92a6iweiaOc71t13Op\nt/c5wdgEF+oj0Fuj/2UARzsb3R5GKzGL3Fq35kqN14zD98f+66Fs7gfT7pM/\nce59tcLSebU9xBTV/n/yIQsVJzznD9qBnNGlEzc192FGTCExj4GbPBKuyLfo\nSWoJ4g7m3bhTvbCoQQvER9FRksM/zzDxXKJeIoz1UQ51DUCGH1QnPd2LjRt+\nutg4msI1VnnINKqDFSBmTNXSFr483zO1f4gsbrhZxqCL7u4aMJYzv4Z9B+ku\n3MfE\r\n=WZ8u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCz3gg8lNWvvAKuYYpmlx4Q9fIr2IaFBQ6/HTJnqJLLAiEAkl2aHYk+RE6ZJxdxKSq3KzxBj0AJNr5F2iPjMH3Rrxc="}]},"maintainers":[{"name":"ashgkwd","email":"ash.gkwd@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/moment-hijri_2.1.1_1543486052839_0.8854702022272103"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-29T10:07:32.664Z","2.1.1":"2018-11-29T10:07:33.003Z","modified":"2022-04-04T15:45:29.102Z"},"maintainers":[{"name":"ashgkwd","email":"ash.gkwd@gmail.com"}],"description":"A Hijri calendar (Based on Umm al-Qura calculations) plugin for moment.js.","homepage":"https://github.com/xsoh/moment-hijri","keywords":["hijri","hijriah","arabic","lunar","Umm al-Qura","date","calendar","conversion","convert"],"repository":{"type":"git","url":"git://github.com/xsoh/moment-hijri.git"},"author":{"name":"Suhail Alkowaileet","email":"xsoh.k7@gmail.com"},"bugs":{"url":"https://github.com/xsoh/moment-hijri/issues"},"license":"MIT","readme":"[![NPM version][npm-version-image]][npm-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url]\n\nmoment-hijri\n==============\n\nA Hijri (Based on Umm al-Qura calculations) calendar system plugin for moment.js.\n\nAbout\n-----\n\nHijri is the Islamic lunar calendar used by Muslims to determine the proper days on which to observe the annual fasting, to attend Hajj, and to celebrate other Islamic holidays and festivals. More information about Hijri can be found at [wikipedia](https://en.wikipedia.org/wiki/Islamic_calendar).\n\nThis plugin adds Hijri calendar support to [momentjs](http://momentjs.com) library.\n\nCalendar conversion is based on the [Umm al-Qura calculations](http://www.ummulqura.org.sa/).\n\nUpgrading to 2.0.0\n---------------\nBecause of [Using 'h' specifier might cause overlap with hour's specifier](https://github.com/xsoh/moment-hijri/issues/8), the specifier has been changed from `h` to `i` as a prefix. For example in the previous version to get the four digit year, \n`hYYYY` will be used. In version 2.0 or above it should be replaced by `iYYYY`.\n\nWhere to use it?\n---------------\n\nLike `momentjs`, `moment-hijri` works in browser and in Node.js.\n\n### Node.js\n\n```shell\nnpm install moment-hijri\n```\n\n\n```js\nvar moment = require('moment-hijri');\nmoment().format('iYYYY/iM/iD');\n```\n\n### Browser\n```html\n<script src=\"moment.js\"></script>\n<script src=\"moment-hijri.js\"></script>\n<script>\n\tmoment().format('iYYYY/iM/iD');\n</script>\n```\n\n### Require.js\n\n```js\nrequire.config({\n  paths: {\n    \"moment\": \"path/to/moment\",\n    \"moment-hijri\": \"path/to/moment-hijri\"\n  }\n});\ndefine([\"moment-hijri\"], function (moment) {\n  moment().format('iYYYY/iM/iD');\n});\n```\n\nAPI\n---\n\nThis plugin tries to mimic `momentjs` api. Basically, when formatting or parsing a string, add an `i` to the format token such as 'iYYYY' or 'iM'. For example:\n\n```js\nm = moment('1410/8/28', 'iYYYY/iM/iD'); // Parse a Hijri date.\nm.format('iYYYY/iM/iD [is] YYYY/M/D'); // 1410/8/28 is 1990/3/25\n\nm.iYear(); // 1410\nm.iMonth(); // 7\nm.iDate(); // 28\nm.iDayOfYear(); // 236\nm.iWeek(); // 35\nm.iWeekYear(); // 1410\n\nm.add(1, 'iYear');\nm.add(2, 'iMonth');\nm.format('iYYYY/iM/iD'); // 1411/10/28\n\nm.iMonth(11);\nm.startOf('iMonth');\nm.format('iYYYY/iM/iD'); // 1411/12/1\n\nm.iYear(1392);\nm.startOf('iYear');\nm.format('iYYYY/iM/iD'); // 1420/1/1\n\nmoment('1436/1/30', 'iYYYY/iMM/iDD').isValid(); // false (This month is only 29 days).\nmoment('1436/2/30', 'iYYYY/iMM/iDD').isValid(); // true (This month is 30 days).\n\nmoment('1436/2/6 16:40', 'iYYYY/iM/iD HH:mm').format('YYYY-M-D HH:mm:ss'); // 2014-11-28 16:40:00\n\nmoment('2014-11-28 16:40:00', 'YYYY-M-D HH:mm:ss').endOf('iMonth').format('iYYYY/iM/iD HH:mm:ss'); // 1436/2/30 23:59:59\n\n// Complex parse:\nmoment('1990 5 25', 'YYYY iM D').format('YYYY/MM/DD'); // 1990/03/25\n```\n\nTo use the Arabic locale:\n- Load [moment-with-locales](http://momentjs.com/downloads/moment-with-locales.js).\n- Set the global or local locale to `ar-SA` see [here](http://momentjs.com/docs/#/i18n/changing-locale/).\n- use it normally :+1: \n\nHere is example:\n```html\n    <!-- 1- Load the moment-with-locales -->\n    <script src=\"http://momentjs.com/downloads/moment-with-locales.min.js\"></script>\n    <script src=\"https://raw.githubusercontent.com/xsoh/moment-hijri/master/moment-hijri.js\"></script>\n    \n    <script>\n      moment.locale('ar-SA');// 2- Set the global locale to `ar-SA`\n      m = moment();\n      m.format('iYYYY/iM/iDهـ الموافق YYYY/M/Dم'); //3- use it normally \n      //١٤٣٧/٨/١٧هـ الموافق ٢٠١٦/٥/٢٤م\n    </script>\n```\n\nAcknowledgements\n-------\nThis project was built from the great work done by [@behrang](https://github.com/behrang) whose behind [moment-jalaali](https://github.com/jalaali/moment-jalaali) project. \n\nLicense\n-------\n\nMIT\n\n[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat\n[license-url]: LICENSE\n\n[npm-url]: https://npmjs.org/package/moment-hijri\n[npm-version-image]: http://img.shields.io/npm/v/moment-hijri.svg?style=flat\n\n[travis-url]: https://travis-ci.org/xsoh/moment-hijri\n[travis-image]: https://travis-ci.org/xsoh/moment-hijri.svg?style=flat\n","readmeFilename":"README.md"}