PHP code example of marcin-jozwikowski / console-date-picker

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

    

marcin-jozwikowski / console-date-picker example snippets


protected function execute(InputInterface $input, OutputInterface $output): int
{
    $datePicker = new DatePicker($input, $output);
    $date       = $datePicker->getDate(new YMDPickerDisplay(), "Please provide date ");

    $io->success($date->format('Y-m-d H:i:s'));

    return Command::SUCCESS;
}