PHP code example of org.majkel / toolbox

1. Go to this page and download the library: Download org.majkel/toolbox library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

org.majkel / toolbox example snippets




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());



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());