persian 0.1.6-nullsafety persian: ^0.1.6-nullsafety copied to clipboard
Utilities for Persian language/culture. Includes some String extensions and PersianDate class.
persian #
Implements helper functions/extensions for Persian language/culture. Includes number replacement methods for String class and PersianDate class.
Getting Started #
Import the package
import 'package:persian/persian.dart';
Use the extension methods
String myText = '123456789';
String myPersianText = myText.withPersianNumbers(); //Will be ۱۲۳۴۵۶۷۸۹
DateTime myDate = DateTime.now();
PersianDate myPersianDate = myDate.toPersian(); //Will be 1398/10/19
int number = 123456789;
String myPersianNumber = number.toPersianString(); //Will be صد و بیست و سه میلیون و چهارصد و پنجاه و شش هزار و هفتصد و هشتاد و نه