hereldar / date-times
Provides immutable classes for dates, times, time-zones and periods.
0.3.0
2024-03-15 15:45 UTC
Requires
- php: ^8.1.17|^8.2.4|^8.3.0
- hereldar/results: ^0.9
Requires (Dev)
- hereldar/coding-style: ^0.1.0
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.1
- psalm/plugin-phpunit: ^0.18.4
- vimeo/psalm: ^5.23.0
README
This library includes several classes representing the main date-time concepts, including dates, times, time-zones and periods.
LocalDate::now()->minus(weeks: 1)->atTime(LocalTime::noon())->toIso8601();
Highlights
- Separation of concepts
- Immutability
- Type safety
- Cohesion
Installation
Via Composer:
composer require hereldar/date-times
Development
Run the following commands from the project folder:
make tests make static-analysis make coding-standards
To execute:
- A PHPUnit test suite.
- PHPStan and Psalm for static code analysis.
- Easy Coding Standard to fix coding standards.
Documentation
Credits
License
The MIT License (MIT). Please see LICENSE for more information.