Coder Social home page Coder Social logo

datetime's Introduction

The DateTime Package

Build Status Scrutinizer Code Quality Code Coverage

Latest Stable Version Total Downloads Latest Unstable Version License

This is a DateTime package built for the Joomla! Framework during Google Summer of Code 2014. The main goal for this library was to create a DateTime object as an Immutable Value Object.

Immutability

If you know how to use PHP DateTime object then you know almost everything about that package. Before you start using it you need to know one more thing - this DateTime is immutable. To explain what immutability means let's take a look at an example:

$start = new DateTime('2014-08-24');
$end = $start->addDays(2);

echo $start->format('Y-m-d');  // 2014-08-24
echo $end->format('Y-m-d');    // 2014-08-26

Every method of DateTime is returning a new object and is not changing the current one. That's the most important thing what you have to know.

Usage

Credits

Jens Segers for their approach to translations

Installation via Composer

Add "joomla/datetime": "~2.0" to the require block in your composer.json and then run composer install.

{
	"require": {
		"joomla/datetime": "~2.0"
	}
}

Alternatively, you can simply run the following from the command line:

composer require joomla/date "~2.0"

datetime's People

Contributors

asika32764 avatar mbabker avatar photodude avatar tomaszhanc avatar wilsonge avatar

Watchers

 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.