PHP code example of godsdev / tools
1. Go to this page and download the library: Download godsdev/tools 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/ */
godsdev / tools example snippets
use GodsDev\Tools\Tools;
Tools::LOCALE['cs'] => [
'date format' => 'j. F',
'full date format' => 'j. F Y',
'time format' => 'H:i:s',
'weekdays' => [
'Sunday' => 'neděle',
'Monday' => 'pondělí',
'Tuesday' => 'úterý',
'Wednesday' => 'středa',
'Thursday' => 'čtvrtek',
'Friday' => 'pátek',
'Saturday' => 'sobota'
],
'months' => [
'January' => 'leden',
'February' => 'únor',
'March' => 'březen',
'April' => 'duben',
'May' => 'květen',
'June' => 'červen',
'July' => 'červenec',
'August' => 'srpen',
'September' => 'září',
'October' => 'říjen',
'November' => 'listopad',
'December' => 'prosinec'
],
'time ago' => [
'y' => ['rok', 'roky', 'let'], //enclination for "1 year" form, "2-4 years" form, and "5+ years" form
'm' => ['měsíc', 'měsíce', 'měsíců'],
'd' => ['den', 'dny', 'dnů'],
'h' => ['hodina', 'hodiny', 'hodin'],
'i' => ['minuta', 'minuty', 'minut'],
's' => ['vteřina', 'vteřiny', 'vteřin'],
'ago' => 'zpátky',
'in' => 'za',
'moment' => 'okamžik'
]
];