PHP code example of sergioccrr / datetimespanish

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

    

sergioccrr / datetimespanish example snippets




echo (new DateTimeSpanish)->setDate(2020, 1, 6)->format('l, d F Y');
// Return "Lunes, 06 Enero 2020"

// Instead of:

echo (new DateTime)->setDate(2020, 1, 6)->format('l, d F Y');
// Return "Monday, 06 January 2020"