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
860 stars 110 forks source link

نمایش روز هفته #68

Closed vahidalvandi closed 5 years ago

vahidalvandi commented 5 years ago

سلام چطوری روز هفته را بدست بیارم مثلا امروز سه شنبه است ؟

thearsalan commented 5 years ago

سلام چطوری روز هفته را بدست بیارم مثلا امروز سه شنبه است ؟

You can use %A key if you're formatting the Jalalian object. Please checkout the documentation for a better reference.

There's also the getDayOfWeek() method on the Jalalian object which gives you the index of the day in the Jalali week.

For instance, Jalalian::now()->getDayOfWeek() returns 6, which represents Friday, the 6th element in the Jalali week array.