Skip to content

datamweb/jdf_helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

StyleCI

CodeIgniter jdf_helper

Hijri_Shamsi,Solar(Jalali) Date and Time Helper for CodeIgniter

#Requirements CodeIgniter should be configured to load jdf_helper automatically.

#Installation

Just ...

  • 1.copy jdf_helper.php into the applications/helpers directory.
    1. Autoload the helper in application/config/autoload.php or load it in needed controllers with $this->load->helper('jdf');.

Enjoy now.

Usage

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)); //۱۴۰۳-۰۱-۰۷ ۰۳:۲۳:۳۲

Contact info