Coder Social home page Coder Social logo

jdatetime's Introduction

#jDateTime

PHP class to convert dates from Gregorian calendar system to Jalali calendar system and vice versa. Supports dates beyond 2038.
Jalali, also known as Shamsi or Hijri Shamsi is the Iranian calendar system.
Build Status

#About v2.2.0

PHP's default date function does not support years higher than 2038, so the DateTime class was introduced in PHP5 to solve this problem and provide more sophisticated date methods. Iranian users have been using an old jdate function to convert Gregorian date to the Jalali equivalent, which is completely based on the old php date function so its pretty much out-dated.

#Requirements

jDateTime Requires PHP >= 5.2

#Installation

##Using Composer

You can install this package using composer. Add this package to your composer.json:

"require": {
	"sallar/jdatetime": "dev-master"
}

or if you prefer command line, change directory to project root and:

php composer.phar require "sallar/jdatetime":"dev-master"

##Manual Installation

Get a copy of package source code. You can do this in two ways:

  1. Download ZIP version of the source code and unzip it in desired location
  2. Run git clone https://github.com/sallar/jDateTime.git to clone this repository

After getting a copy of source code, it is enough to include jdatetime.class.php where you need to use it.

require_once 'path/to/source/jdatetime.class.php';

#Examples

Please see examples.php and example-static.php for working examples.

#Contributors:

##License jDateTime was created by Sallar Kaboli and released under the MIT License.

Copyright (C) 2015 Sallar Kaboli
Part of Phoenix Framework (p5x.org) by Phoenix Alternatvie

Original Jalali to Gregorian (and vice versa) convertor:
Copyright (C) 2000 Roozbeh Pournader and Mohammad Toossi

The MIT License (MIT)

Copyright (C) 2003-2015 Sallar Kaboli

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

1- The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

2- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

#Resources

#Support This Project

Donate via Paypal

jdatetime's People

Contributors

sallar avatar afshinm avatar pilevar avatar ammont avatar nimamo avatar pooyanism avatar

Stargazers

mohammad avatar

Watchers

mohammad avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.