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
856 stars 111 forks source link

Format Not work #96

Closed AngusDV closed 3 years ago

AngusDV commented 4 years ago

these methods not work : // pass human readable strings to make timestamps $date = Jalalian::forge('last sunday');

// get the timestamp $date = Jalalian::forge('last sunday')->getTimestamp(); // 1333857600

// format the timestamp $date = Jalalian::forge('last sunday')->format('%B %d، %Y'); // دی 02، 1391 $date = Jalalian::forge('today')->format('%A, %d %B %y'); // جمعه، 23 اسفند 97

// 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

// get relative 'ago' format $date = Jalalian::forge('now - 10 minutes')->ago() // 10 دقیقه پیش // OR $date = Jalalian::forge('now - 10 minutes')->ago() // 10 دقیقه پیش

morilog commented 4 years ago

how they are not working? what is your inputs and outputs?

AngusDV commented 4 years ago

\Morilog\Jalali\Jalalian::forge(1552608000) work fine \Morilog\Jalali\Jalalian::forge('last sunday') not work or ....

morilog commented 4 years ago

Please share your output. I was tested two cases and there is not any problem.