Small collection of Value Objects to ease composition.
Via Composer
$ composer require gentle/embeddables
use Gentle\Embeddable\Date;
use Gentle\Embeddable\Time;
$date = new Date(
new Date\Year(2016),
new Date\Month(12),
new Date\Day(25)
);
echo (string)$date; // 2016-12-25
$time = new Time(
new Time\Hour(23),
new Time\Minute('04'),
new Time\Second(14)
);
// changing timezone will return a new `Time` object
$time = $time->withTimeZone(new \DateTimeZone('Europe/Monaco'));
echo (string)$time; // 23:04:14
$ composer test
Please see CONTRIBUTING for details.
For any security related issues, please send an email at [email protected] instead of using the issue tracker.
Licensed under the MIT License - see the LICENSE file for details.