PHP code example of krocos / datetimems

1. Go to this page and download the library: Download krocos/datetimems 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/ */

    

krocos / datetimems example snippets


use Krocos\DateTimeMs\DateTimeMs;

$dateTimeWithMilliseconds = DateTimeMs::newDateTimeMs();

use Krocos\DateTimeMs\DateTimeMs;

$msTimestamp = DateTimeMs::dateTimeToMsTimestamp($datetimeObject)

use Krocos\DateTimeMs\DateTimeMs;

$msDatetime = DateTimeMs::msTimestampToDateTime($msTimestamp);