hereldar/date-times

Provides immutable classes for dates, times, time-zones and periods.

0.3.0 2024-03-15 15:45 UTC

This package is auto-updated.

Last update: 2024-10-29 13:20:14 UTC


README

PHP Code Coverage Type Coverage Psalm Level Packagist License

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:

Documentation

Credits

License

The MIT License (MIT). Please see LICENSE for more information.