org.majkel / toolbox
Toolbox library containing various utilities
v0.1.0
2016-08-22 13:05 UTC
Requires
- php: >=5.3.3
Requires (Dev)
- phpunit/phpunit: ^4.8
- ptrofimov/xpmock: 1.*
- squizlabs/php_codesniffer: 2.*
This package is auto-updated.
Last update: 2024-11-06 10:10:04 UTC
README
Toolbox library containing various utilities
Table of Contents
DateTime
Utilities to manipulate date and time.
Clarion date
Converts Clarion date to DateTime and vice versa
require_once 'vendor/autoload.php'; use org\majkel\toolbox\datetime\Clarion; // test if value is valid Carion date $valid = Clarion::isValid(77028); // convert Clarion date to DateTime $dateTime = Clarion::toDate(77028); // convert DateTime to Clarion date $clarionTimestamp = Clarion::fromDate(new \DateTime());
Comarch date
Converts Comarch Optima XL date to DateTime and vice versa
require_once 'vendor/autoload.php'; use org\majkel\toolbox\datetime\Comarch; // test if value is valid Comarch date $valid = Comarch::isValid(690598877); // convert Comarch date to DateTime $dateTime = Comarch::toDate(690598877); // convert DateTime to Comarch date $clarionTimestamp = Comarch::fromDate(new \DateTime());