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

predefined format doesn't work #57

Closed mhonarvar18 closed 3 years ago

mhonarvar18 commented 5 years ago

hi these codes: // get a predefined format $date = Jalalian::forge('last sunday')->format('datetime'); // 1391-10-02 00:00:00 $date = Jalalian::forge('last sunday')->format('date'); // 1391-10-02 $date = Jalalian::forge('last sunday')->format('time'); // 00:00:00

doesn't work. error:

(1/1) InvalidArgumentExceptionUnexpected data found.Unexpected data found.The separation symbol could not be foundA two digit second could not be found

loverdeveloper commented 5 years ago

@morilog $date = Jalalian::forge('yesterday')->format('date'); when i run second line i get this date "18ق.ظ30Asia/tehran" what is it?

morilog commented 5 years ago

@ikosar because this is a missed featured from last version i forget to implement and still a bug. i will fixed it as soon as possible. BTW you can use format('Y-m-d H:i:s') instead of that