flutter_khmer_chankitec 0.0.6 copy "flutter_khmer_chankitec: ^0.0.6" to clipboard
flutter_khmer_chankitec: ^0.0.6 copied to clipboard

A Flutter plugin for Khmer lunar calendar (Chhankitek/ចន្ទគតិ) calculations. Convert Gregorian dates to Khmer lunar dates with full support for Buddhist calendar features including Sila days detection.

flutter_khmer_chankitec #

A Flutter plugin for Khmer lunar calendar (Chhankitek/ចន្ទគតិ) calculations and date conversions.

pub package


💝 Support This Project #

Donate via KHQR
Scan to donate via KHQR (ស្កេនដើម្បីបរិច្ចាគតាម KHQR)

Features #

  • High Precision: Uses astronomical calculations for New Year (Moha Songkran) and Era transitions.
  • Comprehensive: Handles Leap Months (Athikameas) and Leap Days (Chantreathimeas).
  • Pure Dart: Zero dependencies, works on all platforms.

Installation #

dependencies:
  flutter_khmer_chankitec: ^0.0.5

Usage #

Main Methods #

1. Get current Khmer lunar date

// Chhankitek.now() - បង្ហាញកាលបរិច្ឆេទចន្ទគតិចប្ចុប្បន្ន
final lunarDate = Chhankitek.now();
print(lunarDate.toString());
// Output: ថ្ងៃអាទិត្យ ១០ កើត ខែបុស្ស ឆ្នាំរោង ឆស័ក ពុទ្ធសករាជ ២៥៦៨
//         ត្រូវនឹងថ្ងៃទី០៨ ខែមករា ឆ្នាំ២០២៥

2. Convert from Gregorian date

// Chhankitek.fromDate(DateTime) - បំប្លែងថ្ងៃខែសកល ទៅជា ចន្ទគតិ
final date = Chhankitek.fromDate(DateTime(2024, 4, 13));

KhmerLunarDate Properties #

You can access individual fields for custom display.

  • dayOfWeek: Day of week in Khmer (ថ្ងៃនៃសប្ដាហ៍)
    Example: ថ្ងៃអាទិត្យ, ថ្ងៃច័ន្ទ

  • lunarDay: Lunar day with phase (ថ្ងៃខែចន្ទគតិ)
    Example: ១ កើត, ១៥ រោច

  • lunarMonth: Lunar month name (ឈ្មោះខែចន្ទគតិ)
    Example: មិគសិរ, បុស្ស, ចេត្រ

  • lunarZodiac: Zodiac animal (ឆ្នាំ ទាំង ១២)
    Example: ជូត, ឆ្លូវ, រោង

  • lunarEra: Era name (ស័ក)
    Example: ឆស័ក, ឯកស័ក

  • lunarYear: Buddhist Era year (ពុទ្ធសករាជ)
    Example: ២៥៦៨

  • solarDate: Formatting for solar date info (ថ្ងៃខែឆ្នាំសកល ជាភាសាខ្មែរ)
    Example: ថ្ងៃទី០៨ ខែមករា ឆ្នាំ២០២៥

Helper Booleans #

Easy checks for special religious days.

  • isSilaDay: Checks if it is a holy day (ថ្ងៃសីល)
  • isFullMoon: Checks if it is full moon (ថ្ងៃពេញបូណ៌មី)
  • isNewMoon: Checks if it is new moon (ថ្ងៃដាច់ខែ)
if (lunarDate.isSilaDay) {
  print('Today is Sila day! (ថ្ងៃនេះជាថ្ងៃសីល)');
}

License #

MIT License - Copyright (c) 2026 Veng Ann

1
likes
0
points
432
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for Khmer lunar calendar (Chhankitek/ចន្ទគតិ) calculations. Convert Gregorian dates to Khmer lunar dates with full support for Buddhist calendar features including Sila days detection.

Repository (GitHub)
View/report issues

Topics

#khmer #calendar #lunar-calendar #buddhist-calendar #cambodia

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_khmer_chankitec