I want to change the time and date calendar to Jalali (Shamsi calendar used in Iran) in my system. How can I do this?
"language_title" => "English",
"dir" => "ltr", // ltr = left to right, rtl = right to left
"language_code" => "en",
"intl_locale" => "en_US",
"dec_point" => ".",
"thousands_sep" => ",",
"dateformat_full" => "D, M j Y g:i A", // http://php.net/manual/en/function.date.php
"dateformat_date_long" => "D, M j Y", // http://php.net/manual/en/function.date.php
"intl_dateformat_full" => "E, d MMM yy h:m a", // http://userguide.icu-project.org/formatparse/datetime
"intl_dateformat_date_long" => "E, d MMMM yyyy", // http://userguide.icu-project.org/formatparse/datetime
In your
config/app.php
file, you've to change the following setting :Assuming that your timezone is
IST
:)Many years ago, I made a third party calendar helper to convert a Gregorian date to Jalali. I use it inside a Laravel service. The main methods are
jNow
andjdate
Converting from the western (Gregorian) calendar to another calendar is going to be difficult. A quick Google search came up with one item:
Note that I have not tried to use this library, nor am I even sure it's going to do what you want.
in
config/app.php
set timezone to 'Asia/Tehran' but it saves only time based on iran for converting Gregorian to Shamsi Date you can use Miladr Package