Skip to content

A PHP class for convert gregorian date to jalali (Shamsi) date with Codeginiter3 integration

License

Notifications You must be signed in to change notification settings

mehrdadashtari/SDate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

(S)hamsi (Date)

This is an easy php class that can convert Gregorian date to Jalali (Shamsi) date by using [JDate] (http://jdf.scr.ir/rahnama/?t=jdate) php functions

You can use this class in your Codeigniter project or your Pure codes by following instructions:

Use in Codeigniter 3

for use in Codeginiter 3 framework, you must copy SDate.php to Application/libraries/SDate.php path and push it into $autoload['libraries'] array:

application/config/autoload.php

$autoload['libraries'] = array("sdate");

also you can load this class in your controller instead define in autoload file:

$this->load->library('sdate');

after load the class, you can access to SDate public methods and jdate functions by following line:

$this->sdate->SOME_METHOD();

Use in Pure codes

It's very simple! just include SDate.php class and create an object from it:

include 'SDate.php';

$sdate = new SDate();
$sdate->SOME_METHOD();

About

A PHP class for convert gregorian date to jalali (Shamsi) date with Codeginiter3 integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%