
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Persian (Jalali, Khorshidi) Plugin for Day.js, Jalaliday 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
Unlike 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
NPM
npm install --save jalaliday
YARN
yarn add jalaliday
import dayjs from 'dayjs'
import jalaliday from 'jalaliday'
dayjs.extend(jalaliday)
if you want to all new instanses of dayjs use jalali
calendar, you can set default calendar
dayjs.calendar('jalali') // Jalali Calendar
// OR
dayjs.calendar('gregory') // Gregorian Calendar
also you can create a jalali date without changing default calendar
const date = dayjs()
const jalaliDate = date.calendar('jalali')
with combination of calendar
and locale
we have multi language for real
dayjs().calendar('jalali').locale('en').format('DD MMMM YYYY') // '13 Shahrivar 1397'
dayjs().calendar('gregory').locale('fa').format('DD MMMM YYYY') // '04 سپتامبر 2018'
All Api operations of Jalaliday is same as Dayjs itself but calendar based, for more information checkout Dayjs API For a glance:
.format(stringWithTokens: string)
.diff(compared: Dayjs, unit: string (default: 'milliseconds'), float?: boolean)
.valueOf()
.unix()
.daysInMonth()
.toDate()
.toArray()
.toJSON()
.toISOString()
.toObject()
.toString()
FAQs
Persian (Jalali, Khorshidi) Plugin for Day.js
The npm package jalaliday receives a total of 2,439 weekly downloads. As such, jalaliday popularity was classified as popular.
We found that jalaliday demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.