2017 © Pedro Peláez
 

library jalali

Shamsi Date For Laravel 5.4

image

parsidev/jalali

Shamsi Date For Laravel 5.4

  • Friday, May 11, 2018
  • by parsidev
  • Repository
  • 1 Watchers
  • 6 Stars
  • 1,531 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 4 Open issues
  • 7 Versions
  • 4 % Grown

The README.md

parsidev/jalali

This Package helps developers to easily work with Jalali (Shamsi or Iranian) dates in Laravel 5 applications, based on Jalali (Shamsi) DateTime class., (*1)

, (*2)

Installation

In the require key of composer.json file add the following, (*3)

    "parsidev/jalali": "dev-master"

Run the Composer update comand, (*4)

$ composer update

In your config/app.php add 'Parsidev\Jalali\JalaliServiceProvider' to the end of the $providers array, (*5)

        'Parsidev\Jalali\JalaliServiceProvider',

, (*6)

Basic Usage

Examples

Some Examples, (*7)

// default timestamp is now
$date = jDate::forge();

// pass timestamps
$date = jDate::forge(1333857600);

// pass strings to make timestamps
$date = jDate::forge('last sunday');

// get the timestamp
$date = jDate::forge('last sunday')->time(); // 1333857600

// format the timestamp
$date = jDate::forge('last sunday')->format('%B %d، %Y'); // دی 02، 1391

// get a predefined format
$date = jDate::forge('last sunday')->format('datetime'); // 1391-10-02 00:00:00
$date = jDate::forge('last sunday')->format('date'); // 1391-10-02
$date = jDate::forge('last sunday')->format('time'); // 00:00:00

// amend the timestamp value, relative to existing value
$date = jDate::forge('2012-10-12')->reforge('+ 3 days')->format('date'); // 1391-07-24

// get relative 'ago' format
$date = jDate::forge('now - 10 minutes')->ago() // ۱۰ دقیقه پیش

The Versions

11/05 2018

5.4.x-dev

5.4.9999999.9999999-dev

Shamsi Date For Laravel 5.4

  Sources   Download

MIT

The Requires

 

by Mohammad Reza

11/05 2018

dev-master

9999999-dev

Shamsi Date For Laravel 5

  Sources   Download

MIT

The Requires

 

by Mohammad Reza

13/03 2018

5.6.x-dev

5.6.9999999.9999999-dev

Shamsi Date For Laravel 5.6

  Sources   Download

MIT

The Requires

 

by Mohammad Reza

06/10 2017

v5.5.x-dev

5.5.9999999.9999999-dev

Shamsi Date For Laravel 5.5

  Sources   Download

MIT

The Requires

 

by Mohammad Reza

30/08 2016

v5.3.x-dev

5.3.9999999.9999999-dev

Shamsi Date For Laravel 5

  Sources   Download

MIT

The Requires

 

by Mohammad Reza

28/12 2015

5.2.x-dev

5.2.9999999.9999999-dev

Shamsi Date For Laravel 5.2

  Sources   Download

MIT

The Requires

 

by Mohammad Reza

06/07 2015

5.1.x-dev

5.1.9999999.9999999-dev

Shamsi Date For Laravel 5

  Sources   Download

MIT

The Requires

 

by Mohammad Reza