PHP code example of approached / laravel-date-international

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

    

approached / laravel-date-international example snippets


Approached\LaravelDateInternational\ServiceProvider::class,

and

'Dateintl'=> Approached\LaravelDateInternational\DateIntlFacade::class,

    Date:<br>
    {{ dateintl_date('short', $date) }}<br>
    {{ dateintl_date('medium', $date) }}<br>
    {{ dateintl_date('long', $date) }}<br>
    {{ dateintl_date('full', $date) }}<br><br>

    Time:<br>
    {{ dateintl_time($date) }}<br>
    {{ dateintl_time($date, true) }} (with seconds)<br><br>

    Full:<br>
    {{ dateintl_full('short', $date) }}<br>
    {{ dateintl_full('medium', $date) }}<br>
    {{ dateintl_full('long', $date) }}<br>
    {{ dateintl_full('full', $date, true) }}  (with seconds)<br>

$str = Dateintl::full('short', $date);

$str = Dateintl::full('short', $date, false, 'japanese');
bash
sudo apt-get install php-intl