joomla/datetime

This package is abandoned and no longer maintained. The author suggests using the nesbot/carbon package instead.

Joomla DateTime Package

Package info

github.com/joomla-framework/datetime

Type:joomla-package

pkg:composer/joomla/datetime

Statistics

Installs: 1 627

Dependents: 0

Suggesters: 0

Stars: 3

Open Issues: 3

2.0.0 2014-09-18 16:53 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

LGPL-2.1+ a8c3527ed4eaf651c87efe31d14adecd81f41328

frameworkjoomladatetime

This package is not auto-updated.

Last update: 2019-02-20 18:12:17 UTC


README

👁 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"