{"_id":"jalali-plugin-dayjs","_rev":"3-bc5c762fa8ff1b800d6c520a035cb975","name":"jalali-plugin-dayjs","dist-tags":{"latest":"1.1.4"},"versions":{"1.0.0":{"name":"jalali-plugin-dayjs","version":"1.0.0","keywords":["dayjs","date","time","immutable","moment","jalali"],"author":{"name":"sssajjad007"},"license":"MIT","_id":"jalali-plugin-dayjs@1.0.0","web":"dist/jalaliday.umd.min.js","dist":{"shasum":"f348a39c3bad0156734bda7c84b6b0d0ca5c082d","tarball":"https://registry.npmjs.org/jalali-plugin-dayjs/-/jalali-plugin-dayjs-1.0.0.tgz","fileCount":16,"integrity":"sha512-fZ3BSpgBpa7o/dH5paXGcukQ0yFGlBmN8ygPJOSihDsROuWj7h3FUPTiHS6paNbWzw+uC/gZMcAWEkfimHKhug==","signatures":[{"sig":"MEUCIQDuSCfPyIhZhNks1OGs2wmAivU6nilnXs9siT8LH4UaBgIgFDd1TKjlsXGDggCxejubX+dWudD1jVsFfOwjkIj9FUw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47406},"jest":{"roots":["test"],"testRegex":"test/(.*?/)?.*test.js$","transform":{"^.+\\.js$":"<rootDir>/jest.transform.js"},"collectCoverage":true,"testEnvironment":"node","coverageDirectory":"./coverage/","collectCoverageFrom":["src/**/*"]},"main":"dist/jalaliday.cjs.min.js","types":"index.d.ts","module":"dist/jalaliday.esm.js","gitHead":"bb19d57e9353ac3827dabf0676cf331e23e39ea9","scripts":{"lint":"eslint src/* test/*","test":"yarn build && jest","build":"bili","release":"standard-version $* && git push --follow-tags && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"sssajjad008","email":"sssajjad.76@gmail.com"},"pre-commit":["lint"],"repository":{"url":"","type":"git"},"_npmVersion":"8.6.0","description":"Persian (Jalali, Khorshidi) Plugin for Day.js","directories":{},"jsnext:main":"dist/jalaliday.esm.js","_nodeVersion":"18.0.0","_hasShrinkwrap":false,"devDependencies":{"bili":"^4.8.1","jest":"^24.9.0","dayjs":"^1.11.11","eslint":"^6.2.1","codecov":"^3.5.0","mockdate":"^2.0.5","pre-commit":"^1.2.2","standard-version":"7.0.0","@babel/preset-env":"^7.5.5","eslint-plugin-jest":"^22.15.2","eslint-plugin-import":"^2.18.2","eslint-config-airbnb-base":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jalali-plugin-dayjs_1.0.0_1719844575873_0.9925688984914156","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"jalali-plugin-dayjs","version":"1.1.2","keywords":["dayjs","date","time","immutable","moment","jalali"],"author":{"name":"sssajjad007"},"license":"MIT","_id":"jalali-plugin-dayjs@1.1.2","web":"dist/jalaliday.umd.min.js","dist":{"shasum":"d5933b73dc43ad9feb0f6bf441b5d6d18312a0db","tarball":"https://registry.npmjs.org/jalali-plugin-dayjs/-/jalali-plugin-dayjs-1.1.2.tgz","fileCount":15,"integrity":"sha512-+8OPATBK81vxWgcPz6IfsrwOaC/z9yyTvt4M6OGIsOe7VnfT7Nx359Wet4V86g+ErwZFlFoAxgxy6siTr7P2FQ==","signatures":[{"sig":"MEUCIQDsAb9htaRnLJpq0kYa4drSKTDL4pZoW8Xa2acB0J6fYwIgCubh/Ncats3VTX0fLiCSvrNsPWZZ4Nb091QMlXZKoT0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55652},"jest":{"roots":["test"],"testRegex":"test/(.*?/)?.*test.js$","transform":{"^.+\\.js$":"<rootDir>/jest.transform.js"},"collectCoverage":true,"testEnvironment":"node","coverageDirectory":"./coverage/","collectCoverageFrom":["src/**/*"]},"main":"dist/jalaliday.cjs.min.js","types":"index.d.ts","module":"dist/jalaliday.esm.js","gitHead":"4cc9f86d5bcb8cc06edfd28ac3e5780295c9c892","scripts":{"lint":"eslint src/* test/*","test":"yarn build && jest","build":"bili","release":"standard-version $* && git push --follow-tags && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"sssajjad008","email":"sssajjad.76@gmail.com"},"pre-commit":["lint"],"repository":{"url":"","type":"git"},"_npmVersion":"10.2.4","description":"Persian (Jalali, Khorshidi) Plugin for Day.js","directories":{},"jsnext:main":"dist/jalaliday.esm.js","_nodeVersion":"21.3.0","_hasShrinkwrap":false,"devDependencies":{"bili":"^4.8.1","jest":"^24.9.0","dayjs":"^1.11.11","eslint":"^6.2.1","codecov":"^3.5.0","mockdate":"^2.0.5","pre-commit":"^1.2.2","standard-version":"7.0.0","@babel/preset-env":"^7.5.5","eslint-plugin-jest":"^22.15.2","eslint-plugin-import":"^2.18.2","eslint-config-airbnb-base":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jalali-plugin-dayjs_1.1.2_1719846328350_0.5012564677224212","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"jalali-plugin-dayjs","version":"1.1.3","keywords":["dayjs","date","time","immutable","moment","jalali"],"author":{"name":"sssajjad007"},"license":"MIT","_id":"jalali-plugin-dayjs@1.1.3","homepage":"https://github.com/sssajjad007/jalali-plugin-dayjs#readme","bugs":{"url":"https://github.com/sssajjad007/jalali-plugin-dayjs/issues"},"web":"dist/jalaliday.umd.min.js","dist":{"shasum":"177b464e45d6fa8438138b690ce0da6e799c2293","tarball":"https://registry.npmjs.org/jalali-plugin-dayjs/-/jalali-plugin-dayjs-1.1.3.tgz","fileCount":15,"integrity":"sha512-Nrc8Gy6/IKCAa7Nf5QpdpQfOzHD7HHTbL9YDgaqbRtnVyVKvBn/aJ8ARvVNLyjKEDSgQPltKI5r6Tx0v5/mJFA==","signatures":[{"sig":"MEUCICDDfIZu/nFN1u3kAGsuztdqxiRqd6YCHyXAGDUJRikKAiEAlGvelzVdH2tk5OdQ/S92+v2aQsChnAJq7+zQbd13vCg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55839},"jest":{"roots":["test"],"testRegex":"test/(.*?/)?.*test.js$","transform":{"^.+\\.js$":"<rootDir>/jest.transform.js"},"collectCoverage":true,"testEnvironment":"node","coverageDirectory":"./coverage/","collectCoverageFrom":["src/**/*"]},"main":"dist/jalaliday.cjs.min.js","types":"index.d.ts","module":"dist/jalaliday.esm.js","gitHead":"59ec82a43fdd9570203daa5215c7905da0229d11","scripts":{"lint":"eslint src/* test/*","test":"yarn build && jest","build":"bili","release":"standard-version $* && git push --follow-tags && npm publish","prepublishOnly":"npm run build"},"_npmUser":{"name":"sssajjad008","email":"sssajjad.76@gmail.com"},"pre-commit":["lint"],"repository":{"url":"git+https://github.com/sssajjad007/jalali-plugin-dayjs.git","type":"git"},"_npmVersion":"10.2.4","description":"Persian (Jalali, Khorshidi) Plugin for Day.js","directories":{},"jsnext:main":"dist/jalaliday.esm.js","_nodeVersion":"21.3.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"bili":"^4.8.1","jest":"^24.9.0","dayjs":"^1.11.11","eslint":"^6.2.1","codecov":"^3.5.0","mockdate":"^2.0.5","pre-commit":"^1.2.2","standard-version":"7.0.0","@babel/preset-env":"^7.5.5","eslint-plugin-jest":"^22.15.2","eslint-plugin-import":"^2.18.2","eslint-config-airbnb-base":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jalali-plugin-dayjs_1.1.3_1719867867943_0.8740857585799515","host":"s3://npm-registry-packages"}},"1.1.4":{"name":"jalali-plugin-dayjs","version":"1.1.4","description":"Persian (Jalali, Khorshidi) Plugin for Day.js","main":"dist/jalaliday.cjs.min.js","web":"dist/jalaliday.umd.min.js","module":"dist/jalaliday.esm.js","jsnext:main":"dist/jalaliday.esm.js","types":"index.d.ts","scripts":{"test":"yarn build && jest","lint":"eslint src/* test/*","build":"bili","release":"standard-version $* && git push --follow-tags && npm publish","prepublishOnly":"npm run build"},"pre-commit":["lint"],"jest":{"testEnvironment":"node","roots":["test"],"testRegex":"test/(.*?/)?.*test.js$","coverageDirectory":"./coverage/","collectCoverage":true,"collectCoverageFrom":["src/**/*"],"transform":{"^.+\\.js$":"<rootDir>/jest.transform.js"}},"keywords":["dayjs","date","time","immutable","moment","jalali"],"author":{"name":"sssajjad007"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/sssajjad007/jalali-plugin-dayjs.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"devDependencies":{"@babel/preset-env":"^7.5.5","bili":"^4.8.1","codecov":"^3.5.0","dayjs":"^1.11.11","eslint":"^6.2.1","eslint-config-airbnb-base":"^14.0.0","eslint-plugin-import":"^2.18.2","eslint-plugin-jest":"^22.15.2","jest":"^24.9.0","mockdate":"^2.0.5","pre-commit":"^1.2.2","standard-version":"7.0.0"},"_id":"jalali-plugin-dayjs@1.1.4","gitHead":"223325ec6e5bb31ebc7daa98c3960f801117210a","bugs":{"url":"https://github.com/sssajjad007/jalali-plugin-dayjs/issues"},"homepage":"https://github.com/sssajjad007/jalali-plugin-dayjs#readme","_nodeVersion":"21.3.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-d62QGMTufGQ1TSov4a85gBU58PA8aL6wVQs9BnC3+d/VA+v4Sq0OqM3o6RoY+/VZjliYJroGIPwlSVf7uLnZ3w==","shasum":"39a558d8ab02c7eeb5c375461001cc41e6ab2e1b","tarball":"https://registry.npmjs.org/jalali-plugin-dayjs/-/jalali-plugin-dayjs-1.1.4.tgz","fileCount":15,"unpackedSize":56284,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqhXGphWJp2H9MrT2YANlilgMHRhC2Hx90zxCVLI6aggIgYezdUViwEEMaRZKwoZlbb8evSk+cuAoTcUfJCJItFvY="}]},"_npmUser":{"name":"sssajjad008","email":"sssajjad.76@gmail.com"},"directories":{},"maintainers":[{"name":"sssajjad008","email":"sssajjad.76@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jalali-plugin-dayjs_1.1.4_1724054549573_0.24534992726889948"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-01T14:36:15.784Z","modified":"2024-08-19T08:02:30.062Z","1.0.0":"2024-07-01T14:36:16.151Z","1.1.2":"2024-07-01T15:05:28.635Z","1.1.3":"2024-07-01T21:04:28.121Z","1.1.4":"2024-08-19T08:02:29.870Z"},"bugs":{"url":"https://github.com/sssajjad007/jalali-plugin-dayjs/issues"},"author":{"name":"sssajjad007"},"license":"MIT","homepage":"https://github.com/sssajjad007/jalali-plugin-dayjs#readme","keywords":["dayjs","date","time","immutable","moment","jalali"],"repository":{"type":"git","url":"git+https://github.com/sssajjad007/jalali-plugin-dayjs.git"},"description":"Persian (Jalali, Khorshidi) Plugin for Day.js","maintainers":[{"name":"sssajjad008","email":"sssajjad.76@gmail.com"}],"readme":"# jalali-plugin-dayjs\n[![npm (scoped with tag)](https://img.shields.io/npm/v/jalali-plugin-dayjs/latest.svg?style=flat-square)](https://npmjs.com/package/jalali-plugin-dayjs)\n[![npm](https://img.shields.io/npm/dt/jalali-plugin-dayjs.svg?style=flat-square)](https://npmjs.com/package/jalali-plugin-dayjs)\n![Run Tests](https://github.com/sssajjad007/jalali-plugin-dayjs/actions/workflows/test.yml/badge.svg)\n[![js-standard-style](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com)\n[![Codecov](https://img.shields.io/codecov/c/github/sssajjad007/jalali-plugin-dayjs.svg?style=flat-square)](https://codecov.io/gh/)\n\nThis plugin is based on the [jalaliday](https://github.com/alibaba-aero/jalaliday) package. Since that package is no longer maintained, I have addressed and fixed various issues to ensure continued support and functionality.\n\nPersian (Jalali, Khorshidi) Plugin for [Day.js](https://github.com/iamkun/dayjs), jalali-plugin-dayjs 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 jalali-plugin-dayjs all formats are same and standard\n \n > \n\n[📖 **Release Notes**](./CHANGELOG.md)\n\n## Installation\nNPM\n```\nnpm install --save jalali-plugin-dayjs\n```\nYARN\n```\nyarn add jalali-plugin-dayjs\n```\n\n## Usage\n```javascript\nimport dayjs from 'dayjs'\nimport jalaliday from 'jalali-plugin-dayjs'\n\ndayjs.extend(jalaliday)\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\n### API\nAll Api operations of jalali-plugin-dayjs is same as Dayjs itself but calendar based, for more information checkout [Dayjs API](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md)\nFor a glance:\n- [API Reference](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#api-reference)\n  - [Parsing](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#parsing)\n    - [Constructor `dayjs(existing?: string | number | Date | Dayjs)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#constructor-dayjsexisting-string--number--date--dayjs)\n      - [ISO 8601 string](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#iso-8601-string)\n      - [Unix Timestamp (milliseconds since the Unix Epoch - Jan 1 1970, 12AM UTC)](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#unix-timestamp-milliseconds-since-the-unix-epoch---jan-1-1970-12am-utc)\n      - [Native Javascript Date object](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#native-javascript-date-object)\n    - [Clone `.clone() | dayjs(original: Dayjs)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#clone-clone-dayjsoriginal-dayjs)\n    - [Validation `.isValid()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#validation-isvalid)\n  - [Get and Set](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#get-and-set)\n    - [Year `.year()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#year-year)\n    - [Month `.month()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#month-month)\n    - [Day of the Month `.date()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#day-of-the-month-date)\n    - [Day of the Week `.day()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#day-of-the-week-day)\n    - [Hour `.hour()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#hour-hour)\n    - [Minute `.minute()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#minute-minute)\n    - [Second `.second()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#second-second)\n    - [Millisecond `.millisecond()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#millisecond-millisecond)\n    - [Set `.set(unit: string, value: number)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#set-setunit-string-value-number)\n  - [Manipulating](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#manipulating)\n    - [Add `.add(value: number, unit: string)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#add-addvalue-number-unit-string)\n    - [Subtract `.subtract(value: number, unit: string)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#subtract-subtractvalue-number-unit-string)\n    - [Start of Time `.startOf(unit: string)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#start-of-time-startofunit-string)\n    - [End of Time `.endOf(unit: string)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#end-of-time-endofunit-string)\n  - [Displaying](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#displaying)\n    - [Format `.format(stringWithTokens: string)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#format-formatstringwithtokens-string)\n      - [List of all available formats](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#list-of-all-available-formats)\n    - [Difference `.diff(compared: Dayjs, unit: string (default: 'milliseconds'), float?: boolean)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#difference-diffcompared-dayjs-unit-string-default-milliseconds-float-boolean)\n    - [Unix Timestamp (milliseconds) `.valueOf()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#unix-timestamp-milliseconds-valueof)\n    - [Unix Timestamp (seconds) `.unix()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#unix-timestamp-seconds-unix)\n    - [Days in the Month `.daysInMonth()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#days-in-the-month-daysinmonth)\n    - [As Javascript Date `.toDate()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#as-javascript-date-todate)\n    - [As Array `.toArray()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#as-array-toarray)\n    - [As JSON `.toJSON()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#as-json-tojson)\n    - [As ISO 8601 String `.toISOString()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#as-iso-8601-string-toisostring)\n    - [As Object `.toObject()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#as-object-toobject)\n    - [As String `.toString()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#as-string-tostring)\n  - [Query](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#query)\n    - [Is Before `.isBefore(compared: Dayjs)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#is-before-isbeforecompared-dayjs)\n    - [Is Same `.isSame(compared: Dayjs)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#is-same-issamecompared-dayjs)\n    - [Is After `.isAfter(compared: Dayjs)`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#is-after-isaftercompared-dayjs)\n    - [Is a Dayjs `.isDayjs()`](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#is-a-dayjs-isdayjscompared-any)\n  - [Plugin APIs](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#plugin-apis)\n    - [RelativeTime](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#relativetime)\n    - [IsLeapYear](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#isleapyear)\n    - [WeekOfYear](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#weekofyear)\n    - [IsBetween](https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#isbetween)\n","readmeFilename":"README.md"}