Package Exports
- jalali-dayjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jalali-dayjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Day.js Jalali
Jalali calendar plugin for day.js
Installation
npm i jalali-dayjs
or
yarn add jalali-dayjs
How to use
import jalali from 'jalali-dayjs'
dayjs.extend(jalali)
dayjs().locale('fa').format() // 1397-04-01T16:30:00+04:30
dayjs('1397-04-01T16:30:00+04:30', { jalali: true }).format() // 2017-06-22T16:30:00+04:30
dayjs('1397-04-01T16:30:00+04:30', { jalali: true }).locale('fa').format() // 1397-04-01T16:30:00+04:30