Khmer Lunar Date plugin for Day.js
Convert Date to Khmer Lunar Date see more....
npm install dayjs
npm install dayjskh
import dayjs from "dayjs";
import toKhmerDate from "dayjskh";
dayjs.extend(toKhmerDate);
const date = dayjs();
console.log(date.toKhmerDate(format?)); // ថ្ងៃច័ន្ទ ១២កើត ខែស្រាពណ៍ ឆ្នាំថោះ បញ្ចស័ក ពុទ្ធសករាជ ២៥៦៧
// find khmer new year dateTime
console.log(date.khNewYear());
// type
// {
// date: Dayjs;
// days: number;
// dates: {
// date: Dayjs;
// dayName: string;
// }[]
// }
- [ ❌ ] Clean up code
- This library is Ported from momentkh by Thyrith Sor in to Day.js Plugin.
- Combined Source Code from khmercal by Seanghay