All Projects → maherelgamil → arabicdatetime

maherelgamil / arabicdatetime

Licence: MIT License
An easy and useful tool to get Arabic date with Arabic characters for Laravel.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to arabicdatetime

assert-true
A lot of ways to you set your assert as true
Stars: ✭ 19 (-51.28%)
Mutual labels:  composer
phpsm2sm3sm4
php版本,支持国密sm2的签名算法,非对称加解密,sm3的hash, sm4的对称加解密
Stars: ✭ 80 (+105.13%)
Mutual labels:  composer
video-downloader
Video Downloader for Facebook.
Stars: ✭ 63 (+61.54%)
Mutual labels:  composer
XoopsCore25
XOOPS Core 2.5.x (current release is 2.5.10: https://github.com/XOOPS/XoopsCore25/releases)
Stars: ✭ 50 (+28.21%)
Mutual labels:  composer
composer-inheritance-plugin
Opinionated version of Wikimedia composer-merge-plugin to work in pair with Bamarni composer-bin-plugin.
Stars: ✭ 20 (-48.72%)
Mutual labels:  composer
SetupStuff
This repository contains the instructions to install various tools that are helpful to a developer.
Stars: ✭ 18 (-53.85%)
Mutual labels:  composer
php-legal-licenses
A utility to help generate a file containing information about dependencies including the full license text.
Stars: ✭ 62 (+58.97%)
Mutual labels:  composer
phpdoc-vuepress
🎨 Template for generating your PHP API documentation in a pretty VuePress format
Stars: ✭ 19 (-51.28%)
Mutual labels:  composer
sentiment-thermometer
Measure the sentiment towards a word, name or sentence on social networks
Stars: ✭ 56 (+43.59%)
Mutual labels:  composer
zauberlehrling
Collection of tools and ideas for splitting up big monolithic PHP applications in smaller parts.
Stars: ✭ 28 (-28.21%)
Mutual labels:  composer
docker
docker environment for PHP developers
Stars: ✭ 12 (-69.23%)
Mutual labels:  composer
eloquent-mongodb-repository
Eloquent MongoDB Repository Implementation
Stars: ✭ 18 (-53.85%)
Mutual labels:  composer
magento2-product-visibillitygrid
Magento 2 module for determining if/when products are showing up in category
Stars: ✭ 33 (-15.38%)
Mutual labels:  composer
JakePHP
JakePHP is a boilerplate created for modern web application development on Linux platforms. Simply clone, and start developing!
Stars: ✭ 12 (-69.23%)
Mutual labels:  composer
ecommerce
Laravel open source e-commerce system.
Stars: ✭ 209 (+435.9%)
Mutual labels:  composer
is-biz-mail-php
isBizMail tells you whether a given email address belongs to a free email account provider (gmail.com, yahoo.es, yandex.ru etc) or not.
Stars: ✭ 19 (-51.28%)
Mutual labels:  composer
jwt-auth
JSON Web Token Authentication for Laravel and Lumen
Stars: ✭ 46 (+17.95%)
Mutual labels:  composer
terminus-pancakes-plugin
Terminus Plugin to open Pantheon Site Databases in your Favorite SQL Client
Stars: ✭ 22 (-43.59%)
Mutual labels:  composer
The-PHP-Workshop
A New, Interactive Approach to Learning PHP
Stars: ✭ 30 (-23.08%)
Mutual labels:  composer
assets
Inpsyde Assets is a Composer package (not a plugin) that allows to deal with scripts and styles in a WordPress site.
Stars: ✭ 30 (-23.08%)
Mutual labels:  composer

ArabicDateTime

Easy and useful tool to generate arabic or hijri date with multi-language support for laravel .

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads StyleCI

Installation

Composer

Add Laravel ArabicDateTime to your composer.json file.

    composer require maherelgamil/arabicdatetime

Run composer install to get the latest version of the package.

Laravel 5.* only

ArabicDateTime comes with a service provider for Laravel 4. You'll need to add it to your composer.json as mentioned in the above steps, then register the service provider with your application.

Open app/config/app.php and find the providers key. Add Arabicdatetime\ArabicdatetimeServiceProvider to the array.

	...
	Maherelgamil\Arabicdatetime\ArabicdatetimeServiceProvider::class
	...

You can also add an alias to the list of class aliases in the same app.php

	...
	'Arabicdatetime'    => Maherelgamil\Arabicdatetime\Facades\Arabicdatetime::class
	...

Now . publish vendor

    php artisan vendor:publish

Useage

Get date from unixtime

    //$arabDateTime->date({unixtime} , {mode} , {schema} , {numericMode});

    //This function take 4 Parameters :

    //1- unixtime : ex '1418123530'

    //2- mode :
        0 for Arabic date
        1 for Hijri date

    //3- schema : as `php` schema , you can read this page for more info. : http://php.net/manual/en/function.date.php

    //4- numericMode takes two types 'indian'  or 'arabic' and 'arabic' is default

    //5 - Create a Arabicdatetime instance
    $arabDateTime = new Arabicdatetime();

    //for Gregorian date with Englsih numbers
    $arabDateTime->date(1418123530 , 0);

    //for Hijri date with indian numbers
    $arabDateTime->date(1418123530 , 1 , 'd / m / y '  ,'indian');

    //for Hijri date, there is an optional correction, You can add or subtract days with plus and minus
    $arabDateTime->setCorrection('+1');
    $arabDateTime->setCorrection('-1');

Get Days with locale language

    $arabDateTime->getDays();

Get Arabic Days

    $arabDateTime->getArabicDays();

Get Months With locale language

    $arabDateTime->getMonths();

Get Arabic Months

    $arabDateTime->getArabicMonths();

Get Hijri Months with locale language

    $arabDateTime->getHijriMonths();

Get Hijri Months

    $arabDateTime->getArabicHijriMonths();

Get remainnig time

    $arabDateTime->remainingTime(1418123530);

Get left time

    $arabDateTime->leftTime(1418123530);

Get left or remaining time

    $arabDateTime->leftRemainingTime(1418123530);

License

ArabicDateTime is an open-sourced laravel package licensed under the MIT license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].