Hijri_Shamsi,Solar(Jalali) Date and Time Helper for CodeIgniter
#Requirements
CodeIgniter should be configured to load jdf_helper
automatically.
Just ...
- 1.copy
jdf_helper.php
into theapplications/helpers
directory. -
- Autoload the helper in
application/config/autoload.php
or load it in needed controllers with$this->load->helper('jdf');
.
- Autoload the helper in
Enjoy now.
For example, typing in the view file.
- echo jstrftime('%Y/%m/%d');
- echo gregorian_to_jalali(2017,03,21,'/');
-
$created_at = '2024-03-26 03:23:32'; jdate('Y-m-d H:i:s',strtotime($created_at)); //۱۴۰۳-۰۱-۰۷ ۰۳:۲۳:۳۲
- Email:Pooya_parsa_dadashi{in}yahoo.com
- website: http://DatamWeb.ir/