Getting Started
Hereldar\DateTimes is a library with several classes representing the main date-time concepts, including dates, times, time-zones and periods.
php
LocalDate::now()->minus(weeks: 1)->atTime(LocalTime::noon())->toIso8601();Highlights
- Separation of concepts
- Immutability
- Type safety
- Cohesion
Installation
Via Composer:
bash
composer require hereldar/date-timesDevelopment
Run the following commands from the project folder:
bash
make tests
make static-analysis
make coding-standardsTo execute:
- A PHPUnit test suite.
- PHPStan and Psalm for static code analysis.
- Easy Coding Standard to fix coding standards.