{"_id":"@dana.chain/jalal-plugin","name":"@dana.chain/jalal-plugin","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@dana.chain/jalal-plugin","version":"1.0.0","description":"Persian (Jalali, Khorshidi) Plugin for Day.js","main":"dist/cjs/bundle.cjs.js","web":"dist/umd/bundle.umd.js","module":"dist/esm/bundle.esm.js","jsnext:main":"dist/esm/bundle.esm.js","types":"index.d.ts","scripts":{"test":"jest","lint":"eslint src/* test/*","build":"rollup -c","prepublishOnly":"npm run build"},"keywords":["dayjs","date","time","immutable","moment","jalali"],"author":{"email":"tech@danachain.com"},"license":"MIT","devDependencies":{"@babel/core":"^7.14.6","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-node-resolve":"^13.0.0","babel-jest":"^27.0.6","dayjs":"^1.11.5","jest":"^24.9.0","mockdate":"^2.0.5","prettier":"^2.3.2","rollup":"^2.52.8","rollup-plugin-size":"^0.2.2","rollup-plugin-terser":"^7.0.2","standard-version":"8.0.1"},"_id":"@dana.chain/jalal-plugin@1.0.0","gitHead":"acb0a0ef8d3b3902591be873b6146b0a276423be","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-2oFrgVTSJ6+Nn7ySaHHzX13DDvzeYriNwDTbvPLpZMlDV4cMeaNa/8OrJQBUOQJOFf+z9ZnLevZMsCKw3ejUWw==","shasum":"0303fda8a5242b6c31eb01840deb19e700423c27","tarball":"https://registry.npmjs.org/@dana.chain/jalal-plugin/-/jalal-plugin-1.0.0.tgz","fileCount":7,"unpackedSize":46399,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDcBrVuvfKyk4r4BEp2a6FaDbgzBHnaDrbaeEKGk8UHigIhAI+JnRi9WxTX6xiyXjiel/fvE/fPWJ5MNnPZ5fxtENHd"}]},"_npmUser":{"name":"dana.chain","email":"dana.karatous@gmail.com"},"directories":{},"maintainers":[{"name":"dana.chain","email":"dana.karatous@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jalal-plugin_1.0.0_1754199268814_0.530625721198805"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-03T05:34:28.681Z","1.0.0":"2025-08-03T05:34:28.990Z","modified":"2025-08-03T05:34:29.344Z"},"maintainers":[{"name":"dana.chain","email":"dana.karatous@gmail.com"}],"description":"Persian (Jalali, Khorshidi) Plugin for Day.js","keywords":["dayjs","date","time","immutable","moment","jalali"],"author":{"email":"tech@danachain.com"},"license":"MIT","readme":"# Dayjs-Jalali-Plugin\n[![npm (scoped with tag)](https://img.shields.io/npm/v/@zoomit/dayjs-jalali-plugin/latest.svg?style=flat-square)](https://www.npmjs.com/package/@zoomit/dayjs-jalali-plugin)\n[![npm](https://img.shields.io/npm/dt/@zoomit/dayjs-jalali-plugin.svg?style=flat-square)](https://www.npmjs.com/package/@zoomit/dayjs-jalali-plugin)\n\n\nPersian (Jalali, Khorshidi) Plugin for [Day.js](https://github.com/iamkun/dayjs), This package add multi-calendar functionality to Day.js core regardless for of locale, so we can have Gregorian calendar is Persian locale of Jalali calendar in English locale\nUnlike moment and becuase of immutablity of dayjs, there is no need for formats like `jYYYY` or `jMM`, in Jalaliday all formats are same and standard\n\n>\n\n## Installation\nNPM\n```\nnpm install --save @zoomit/dayjs-jalali-plugin\n```\nYARN\n```\nyarn add @zoomit/dayjs-jalali-plugin\n```\n\n## Usage\n```javascript\nimport dayjs from 'dayjs'\nimport jalaliPlugin from '@zoomit/dayjs-jalali-plugin'\n\ndayjs.extend(jalaliPlugin)\n```\n\n### Changing calendar\nIf you want to all new instanses of dayjs use `jalali` calendar, you can set default calendar\n```javascript\ndayjs.calendar('jalali') // Jalali Calendar\n// OR\ndayjs.calendar('gregory') // Gregorian Calendar\n```\nalso you can create a jalali date without changing default calendar\n```javascript\nconst date = dayjs()\nconst jalaliDate = date.calendar('jalali')\n```\n\n### Parse Date\n- Parse Gregory date\n```js\nconst date = dayjs('2018-04-04T16:00:00.000Z');\n```\n- Parse Jalali date\n```js\nconst date = dayjs('1398-10-17', { jalali: true });\n```\n\n### Multiple Locale\nwith combination of `calendar` and `locale` we have multi language for real\n```javascript\ndayjs().calendar('jalali').locale('en').format('DD MMMM YYYY') // '13 Shahrivar 1397'\ndayjs().calendar('gregory').locale('fa').format('DD MMMM YYYY') // '04 سپتامبر 2018'\n```\n","readmeFilename":"README.md","_rev":"1-e4bce82fcc00175892260f5d3432daf4"}