khmer_date 1.0.2 copy "khmer_date: ^1.0.2" to clipboard
khmer_date: ^1.0.2 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...
}
19
likes
150
points
172
downloads
screenshot

Documentation

API reference

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

License

MIT (license)

Dependencies

intl

More

Packages that depend on khmer_date