PHP code example of chinleung / laravel-weekday

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

    

chinleung / laravel-weekday example snippets

 php
Weekday::name(0); // Sunday
 php
Weekday::name(1, 'fr'); // Lundi
 php
Weekday::value('Sunday'); // 0
 php
Weekday::value('Dimanche', 'fr'); // 0
 php
Weekday::names('en');
 php
Weekday::name(0)->to('fr')->getName(); // Dimanche
 php
// Object of \ChinLeung\PhpWeek\PhpWeek with Sunday and set to locale of the application.
Weekday::parse('Sunday')->getInstance();