PHP code example of leafs / date

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

    

leafs / date example snippets


tick()->now(); // get the current timestamp
tick()->format('YYYY-MM-DD'); // format the current timestamp
tick()->startOf('month')->add(1, 'day')->set('year', 2018)->format('YYYY-MM-DD HH:mm:ss');

tick('2018-08-08') // parse
tick()->format('{YYYY} MM-DDTHH:mm:ss SSS [Z] A') // display
tick()->set('month', 3)->month() // get & set
tick()->add(1, 'year') // manipulate
tick()->isBefore('...') // query