thai_lunar 0.1.0 copy "thai_lunar: ^0.1.0" to clipboard
thai_lunar: ^0.1.0 copied to clipboard

Pure-Dart Thai lunar calendar: Gregorian conversion, athikamat/athikavar year types, and Buddhist holiday full moons (Makha, Visakha, Asalha).

Changelog #

0.1.0 #

Initial release. Pure-Dart, dependency-free Thai lunisolar calendar engine, ported from pythaidate (MIT © 2023 Mark Hollow).

  • Gregorian <-> Thai lunar conversion (gregorianToThaiLunar, thaiLunarToGregorian).
  • Lunar year classification: lunarYearType, isAthikamat, isAthikavar (normal / athikavar / athikamat — 354 / 355 / 384 days).
  • Buddhist holiday full moons via fullMoonOf (Makha, Visakha, Asalha), with the athikamat month shift and doubled-month-8 (secondEighth) support.
  • เสาร์ห้า (Sao Ha) finder: isSaoHa, saoHaType (with the SaoHaType major/minor grades — เสาร์ห้าใหญ่ ขึ้น 5 ค่ำ vs เสาร์ห้าน้อย แรม 5 ค่ำ), saoHaDatesIn and nextSaoHa — the rare auspicious Saturday on the 5th of lunar month 5 (the strongest auspicious day for consecrating amulets).
  • isWanPhra Buddhist-sabbath detection by the conventional civil lunar reckoning (waxing 8 & 15, waning 8, and the last day of the lunar month), both as a top-level function and as a computed ThaiLunarDate.isWanPhra getter.
  • Lossless round-tripping: thaiLunarToGregorian(gregorianToThaiLunar(d)) == d for every day, with the month-5/6 year-end wrap disambiguated via ThaiLunarDate.isYearEndWrap.
  • ThaiLunarDate is Comparable (chronological) and exposes copyWith, weekday and csYear.
  • Era-aware API (ThaiEra, BE / CE) with beToCe / ceToBe helpers.
  • Integer-only arithmetic; validated against the JDN anchor 2000-01-01 (horakhun 497378, julian day 2451545).
0
likes
160
points
69
downloads

Documentation

API reference

Publisher

verified publisher10v3n4m.cc

Weekly Downloads

Pure-Dart Thai lunar calendar: Gregorian conversion, athikamat/athikavar year types, and Buddhist holiday full moons (Makha, Visakha, Asalha).

Repository (GitHub)
View/report issues

Topics

#thai #calendar #lunar #buddhist #date

License

MIT (license)

More

Packages that depend on thai_lunar