Closed mohamedsabil83 closed 6 months ago
Hi @mohamedsabil83 , thanks for using the plugin. Dayjs has a property which stores the calendar system, and I used the same property to manage calendar systems and their conversion.
You can use the $C
value of a given dayjs instance to check for the calendar system.
// ...code to import and init and extend dayjs
const dt = dayjs("2023-05-14");
const myDate = dt.toCalendarSystem("persian");
const myDateCalendarSystem = myDate.$C;
I will close this issue, please comment with more details and info if you believe this shall be kept open.
Best regards.
Hi @amirhmoradi; thanks for confirming that. After posting my question, I dug deeper and found the $C value and started using it until you replied to be sure if that's the right way or if there is a better or corrected way. Thanks again for the great package.
Hello there. I'm working on a project using your package. I have a method that will get a Gregory or Hijri instance of Dayjs. How can I check which calendar system is used in that instance?