morilog / jalali

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in php appliations, based on Jalali (Shamsi) DateTime class.
MIT License
852 stars 107 forks source link

is there method like isJalali #163

Open sirosfakhri opened 10 months ago

sirosfakhri commented 10 months ago

in my project, I need to check if the date is Jalali or Gregorian?! so, is there any method like this?

\Morilog\Jalali\CalendarUtils::isJalali('1402-06-06'); // TRUE
\Morilog\Jalali\CalendarUtils::isJalali('2023-08-23'); // FALSE
alisalehi1380 commented 10 months ago

Hello to mr. Morteza Parvini and Siros Fakhri.

image

because checkdate() func native in php supportes this : image numbers.

and that's way isJalali() function returns true in both cases!

and in the related testes : image this issue has not tested.