npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jalali-js/i18n

v0.4.2

Published

Locale data and display formatting for jalali-js: English, Farsi, and Pashto, relative time, format templates, strict parsing, numerals, and RTL.

Readme

@jalali-js/i18n

npm version License: MIT Docs

Locale packs and display formatting for jalali-js: English, Farsi, and Pashto, relative time, format templates, strict parsing, numerals, and RTL.

Start here: Live demo · Documentation

npm ecosystem: jalali-js · @jalali-js/i18n · @jalali-js/nlp · @jalali-js/holidays · @jalali-js/react · @jalali-js/vue · @jalali-js/web · @jalali-js/ui-react · @jalali-js/ui-vue · @jalali-js/ui-web

Contents

Install

npm install @jalali-js/i18n

Compatibility

| Item | Support | | ------------ | ------------------------ | | Locales | en, fa, ps | | Dependencies | jalali-js only | | Runtime | Modern Node and browsers | | Node | 22 and 24 (CI matrix) |

React, Vue, and Web bindings already depend on this package through a locale prop. Use it directly when you format dates outside a component.

Quick start

import { format, formatRelative, parseTemplate, en, fa, ps } from '@jalali-js/i18n';

const date = {
  precision: 'date' as const,
  system: 'jalali' as const,
  year: 1403,
  month: 5,
  day: 15,
};

format(date, en); // '15 Mordad 1403'
format(date, fa); // '۱۵ مرداد ۱۴۰۳'
format(date, ps); // Pashto with Afghanistan month names

formatRelative({ ...date, day: 12 }, date, fa); // '۳ روز پیش'
format(date, en, { template: 'YYYY/MM/DD' }); // '1403/05/15'
parseTemplate('1403/05/15', 'YYYY/MM/DD', en); // date, or null

API

| Export | Role | | ------------------ | -------------------------------------------------------- | | en / fa / ps | Locale packs (months, weekdays, digits, ui, direction) | | format | Display string from a calendar date | | formatRelative | "3 days ago", "۳ روز پیش", "in 2 months" | | parseTemplate | Strict parse with YYYY / MM / DD tokens | | formatNumber | Digits in the locale numeral style | | localePackFor | Resolve a pack from a locale code |

Each pack's ui object holds control aria-labels, including closedDay for blocked holiday tips.

Options

Key format options:

| Option | Values / tokens | Default | Notes | | ---------- | ---------------------------------------- | ------- | --------------- | | style | 'long' \| 'short' | - | Preset wording | | weekday | boolean | - | Include weekday | | numerals | 'latn' \| 'arabext' (and pack default) | pack | Digit style | | template | YYYY MM M DD D MMMM … | - | Custom pattern |

Guide: i18n.

Theming

This package has no UI. Theme pickers in the binding packages with --jalali-* CSS variables.

Links

License

MIT