Or download the .zip from the Releases page.
- Open
KhmerCalendarBar.dmgand drag the app to Applications - If macOS blocks the app → System Settings → Privacy & Security → Open Anyway
- The calendar icon appears in your menu bar
Requires macOS 14.0 Sonoma or later (Apple Silicon + Intel)
The app is not notarized with Apple. You only need to allow it once — after that it opens normally.
- Khmer Chhankitek Engine — Full Gregorian ↔ Khmer lunisolar date conversion
- Dual Calendar Grid — Gregorian dates with Khmer lunar dates underneath
- Lunar Phases — កើត (waxing) / រោច (waning) display on every day
- Buddhist Era — ពុទ្ធសករាជ year display
- Animal Year Cycle — 12-year Khmer animal cycle (ជូត, ឆ្លូវ, ខាល, ...)
- Sak Era — 10 Sak cycle (ឯកស័ក, ទោស័ក, ...)
- Khmer Numerals — Full Unicode Khmer numeral display (០១២៣៤៥៦៧៨៩)
- Fixed Gregorian holidays — New Year, Victory Day, Women's Day, Workers' Day, King's Birthday, Constitution Day, Independence Day
- Lunar-computed holidays — Khmer New Year, Visak Bochea, Pchum Ben, Water Festival, Meak Bochea
- Holiday indicators — Coral dots on calendar days, detailed holiday list per month
- Next holiday countdown — Shows upcoming holiday with days remaining
- Light / Dark mode — Automatically adapts to macOS system appearance
- Year overview — 4x3 mini-month grid with holiday highlights, tap to navigate
- Working day status — "ថ្ងៃធ្វើការ" / "ថ្ងៃឈប់សម្រាក" / "ចុងសប្តាហ៍" badge
- Modern Teal theme — Custom color palette (teal, coral, amber) adaptive to light/dark
- Spring animations — Smooth month navigation, hover effects, scale transitions
- Month slide transitions — Directional left/right animation when navigating
- Day cell hover — Interactive scale effect on mouseover
- Keyboard shortcuts — Arrow keys (month), T (today), Y (year overview), Escape (deselect/back)
- Launch at Login — Auto-start on macOS boot
- Midnight refresh — Automatically updates at midnight
- Holiday notifications — macOS notifications for upcoming holidays
- macOS 14.0+
- Xcode 15+ or Swift 5.9+ toolchain
# Clone
git clone https://github.com/RithyTep/KhmerCalendarBar.git
cd KhmerCalendarBar
# Debug build
swift build
# Release build + .app bundle + .zip
./build-app.shcp -R KhmerCalendarBar.app /Applications/
open /Applications/KhmerCalendarBar.appKhmerCalendarBar/
├── Models/
│ ├── KhmerDate.swift # Core Khmer date struct
│ ├── KhmerMonth.swift # 12+2 lunar months
│ ├── KhmerAnimalYear.swift # 12 animal cycle
│ ├── KhmerSak.swift # 10 Sak era cycle
│ ├── MoonPhase.swift # Waxing/waning phases
│ ├── KhmerHoliday.swift # Holiday model
│ ├── DayInfo.swift # Combined day info for grid
│ ├── CalendarConstants.swift # Khmer Unicode strings
│ └── CalendarTheme.swift # Adaptive theme (light/dark mode)
├── Engine/
│ ├── ChhankitekEngine.swift # Main Gregorian ↔ Khmer conversion
│ ├── AstronomicalCalculations # Aharkun, Bodethey, Avoman
│ ├── LeapYearCalculator # Adhikameas/Adhikavar detection
│ ├── NewYearCalculator # Khmer New Year computation
│ ├── MonthNavigator # Month sequencing with leap
│ └── JulianDayConverter # Julian Day Number bridge
├── Services/
│ ├── HolidayService # Fixed + lunar holidays
│ ├── DateFormatterService # Khmer date formatting
│ ├── KhmerNumeralService # Arabic ↔ Khmer numerals
│ └── NotificationService # Holiday notifications
├── ViewModels/
│ └── CalendarViewModel # State + midnight timer + stats
├── Views/
│ ├── PopoverContentView # Main popover layout
│ ├── TodayHeaderView # Today header with status
│ ├── MonthNavigationView # Month navigation + Today button
│ ├── CalendarGridView # 7-column animated grid
│ ├── DayCellView # Day cell with hover effects
│ ├── HolidayListView # Monthly holidays with dates
│ ├── YearOverviewView # 4x3 year overview grid
│ └── FooterView # Launch at Login, Quit
└── Utilities/
├── LaunchAtLogin # SMAppService wrapper
├── CalendarIconGenerator # App icon generator
└── MenuBarIconGenerator # Menu bar icon
The Chhankitek engine converts Gregorian dates to Khmer lunar dates using epoch-based astronomical calculations:
- Julian Day Number — Bridge between Gregorian and internal day counting
- Aharkun — Days elapsed from the epoch
- Bodethey / Avoman — Excess day and lunar excess calculations
- Leap Detection — Determines Adhikameas (leap month, 384 days), Adhikavar (leap day, 355 days), or normal year (354 days)
- New Year — Computes exact Moha Songkran date
- Conversion — Skips full years → skips full months → remaining days = lunar day + phase
Contributions are welcome! Please open an issue or submit a pull request.
Built with SwiftUI for macOS by RithyTep | khmercalendarbar.rithytep.online




