https://github.com/erfansahaf/sdate
A PHP class for convert gregorian date to jalali (Shamsi) date with Codeginiter3 integration
https://github.com/erfansahaf/sdate
codeigniter jalali php
Last synced: 2 months ago
JSON representation
A PHP class for convert gregorian date to jalali (Shamsi) date with Codeginiter3 integration
- Host: GitHub
- URL: https://github.com/erfansahaf/sdate
- Owner: erfansahaf
- License: mit
- Created: 2015-12-27T12:55:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-11T11:05:18.000Z (about 7 years ago)
- Last Synced: 2025-01-11T01:44:26.087Z (4 months ago)
- Topics: codeigniter, jalali, php
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# (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**
```php
$autoload['libraries'] = array("sdate");
```
also you can load this class in **your controller** instead define in autoload file:
```php
$this->load->library('sdate');
```
after load the class, you can access to SDate public methods and jdate functions by following line:
```php
$this->sdate->SOME_METHOD();
```
## Use in Pure codesIt's very simple! just include SDate.php class and create an object from it:
```php
include 'SDate.php';$sdate = new SDate();
$sdate->SOME_METHOD();
```