Skip to the content.

Persian Utils Documentation

Welcome to the Persian Utils library documentation. This comprehensive Java library provides robust tools for Persian/Farsi language processing, including date conversion, number formatting, text processing, and validation of Iranian standards.

Installation

Maven

<dependency>
    <groupId>io.github.jamalianpour</groupId>
    <artifactId>persian-utils</artifactId>
    <version>0.4.0</version>
</dependency>

Features Overview

📅 Date & Time

Complete Jalali (Persian/Shamsi) calendar implementation with conversion, formatting, and holiday support.

Learn more →

🔢 Number Utilities

Convert between Persian, Arabic, and English digits. Format numbers with separators and convert to words.

Learn more →

📝 Text Processing

Detect, normalize, and process Persian text with support for direction detection and URL slug generation.

Learn more →

✅ Validation

Validate Iranian national IDs, IBANs, phone numbers, postal codes, and ATM cards.

Learn more →

Quick Start

// Jalali Date
JalaliDate today = JalaliDate.now();
System.out.println(today.format(DateFormat.FULL));
// Output: شنبه ۱ فروردین ۱۴۰۰

// Number Conversion
String persian = PersianNumberConverter.toPersianDigits("1234");
// Output: ۱۲۳۴

String words = NumberToWords.toPersian(123);
// Output: یکصد و بیست و سه

// Validation
boolean valid = IranianNationalId.isValid("0499370899");

Documentation Sections

Usage Guide

Comprehensive guide covering all features with detailed explanations and examples.

API Reference

Complete API documentation for all classes and methods.

Code Examples

Practical code examples and common use cases.

Support

License

Apache License - see LICENSE for details.