khmer_date 1.0.3 copy "khmer_date: ^1.0.3" to clipboard
khmer_date: ^1.0.3 copied to clipboard

Khmer Date is plugin help you to convert date time and number to Khmer

example/lib/main.dart

import 'package:khmer_date/khmer_date.dart';

void main() {
  String _date = "2024-05-23 09:27:05";
  print(KhmerDate.isToday(_date));
  // result: true or false base on current date
  print(KhmerDate.today(format: "dddd-MMMM-yyyy"));
  // result: ព្រហស្បតិ៍-ឧសភា-២០២៤ (current date)
  print(KhmerDate.date(_date,
      format: "dd-MM-yy", apiFormat: "yyyy-MM-dd hh:mm:ss"));
  // result: ២៣-០៣-២៦
  print(KhmerDate.date(_date, format: "ddd/MMM/yyyy"));
  // result: ព្រហ/ឧសភា/២០២៤
  print(KhmerDate.date(_date, format: "ថ្ងៃdddd"));
  // result: ថ្ងៃព្រហស្បតិ៍
  print(KhmerDate.date(_date, format: "ថ្ងៃdddd ទីdd ខែMMM ឆ្នាំyyyy ម៉ោង hr"));
  // result: ថ្ងៃព្រហស្បតិ៍ ទី២៣ ខែឧសភា ឆ្នាំ២០២៤ ម៉ោង ០៩:២៧ ព្រឹក
  print(KhmerDate.date(_date, format: "ម៉ោង Hr"));
  // result: ម៉ោង ០៩:២៧
  print(KhmerDate.khmerNumber("1234567890 Work..."));
  // result: ១២៣៤៥៦៧៨៩០ Work...
}
18
likes
150
points
69
downloads
screenshot

Publisher

verified publisherrathadev.site

Weekly Downloads

Khmer Date is plugin help you to convert date time and number to Khmer

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

intl

More

Packages that depend on khmer_date