Download the PHP package porta/datetime without Composer
On this page you can find all versions of the php package porta/datetime. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download porta/datetime
More information about porta/datetime
Files in porta/datetime
Package datetime
Short Description PortaOne billing API datetime helper class
License MIT
Homepage https://github.com/portabilling/datetime
Informations about the package datetime
PortaOne Billing API datetime helper class
Purpose
This package intended to simplify datetime and data fields management when work with Portabilling API.
PortaDateTime class exptends standatd DateTimeImmutable class to provide specific methods. All the datatime fields of API has MySQL format and always UTC timezone. This helper class allows easy manipulation between billing UTC datetime strings and desired-timezone DateTime-like objects, unlocking the full power of DateTie class in your biling-related application.
It also support PSR-4 autoload to root namespace () and PSR-11 DI containers for default timezone definition storage.
Usage
I suppose you should be familiar with PortaOne billing API. Start with example, browse PHPdoc. Use sources to understand how it works, it is very simple.
Installation
In the Composer storage. Just add proper require section:
Please, review changelog before to change used version.
Dependencies
- php: ^7.4|^8.0|^8.1|^8.2
- psr/container: "*"
Testing
Tested with PHPUnit 9.6 on php 7.4 to 8.2, 100% coverage, which does not mean everything will work as intended. Current testing and compatibility status check on Github flows
To test, install in dev mode and use:
composer test
command from library root for run all standard modular tests