2017 © Pedro Peláez
 

library facal

Create and Print Persian datetime based on standard DateTime and Carbon

image

irpug/facal

Create and Print Persian datetime based on standard DateTime and Carbon

  • Sunday, March 29, 2015
  • by rhqiq
  • Repository
  • 1 Watchers
  • 4 Stars
  • 63 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

facal

Latest Version Software License, (*1)

A collection of Persian date/time utilities to get and print DateTime Object in Persian formats based on Carbon, \DateTime and IntlCalendar., (*2)

Requirements

Install

Via Composer, (*3)

``` bash $ composer require irpug/facal, (*4)


## Usage ``` php ini_set('intl.default_locale', 'fa_IR'); require 'vendor/autoload.php'; use IrPUG\FaCal\Lib\PersianDateTime; use IrPUG\FaCal\Lib\PersianCarbon; use IrPUG\FaCal\FaCalUtils; $date = new PersianDateTime(); $date->setPersianDate(1394, 2, 2); var_dump($date); var_dump(FaCalUtils::printDateTime($date, FaCalUtils::FULL)); var_dump(FaCalUtils::printDateTime($date, FaCalUtils::SHORT)); var_dump(FaCalUtils::printDateTime($date, FaCalUtils::NONE)); var_dump(FaCalUtils::printDateTime($date, FaCalUtils::LONG)); var_dump(FaCalUtils::printDateTime($date, FaCalUtils::MEDIUM)); var_dump(FaCalUtils::printDateTime($date, "EEEE, d 'of' MMMM y")); var_dump(FaCalUtils::getYear($date)); var_dump(FaCalUtils::getMonthNum($date)); var_dump(FaCalUtils::getMonthName($date)); var_dump(FaCalUtils::getWeekdayName($date)); var_dump(FaCalUtils::getWeekdayNum($date)); var_dump(FaCalUtils::getQuarter($date)); var_dump(PersianCarbon::createFromPersianDate(1394, 1, 1)->addDay()); var_dump(FaCalUtils::printDateTime(PersianCarbon::createFromPersianDate(1394, 1, 1)->addDay(), FaCalUtils::FULL)); var_dump(PersianCarbon::createFromPersianDate(1393, 12, 28)->diffForHumans());

Credits

License

The MIT License (MIT). Please see License File for more information., (*5)

The Versions

29/03 2015

dev-master

9999999-dev https://github.com/irpug/facal

Create and Print Persian datetime based on standard DateTime and Carbon

  Sources   Download

MIT

The Requires

 

The Development Requires

by Reza Haghighi

datetime jalali datetime persian datetime

29/03 2015

v0.1

0.1.0.0 https://github.com/irpug/facal

Create and Print Persian datetime based on standard DateTime and Carbon

  Sources   Download

MIT

The Requires

 

The Development Requires

by Reza Haghighi

datetime jalali datetime persian datetime