Project | Version | TravisCI | Score | Coverage | Issues | StyleCI |
---|---|---|---|---|---|---|
Util | ||||||
Event | [![Latest Stable Version](https://poser.pugx.org/phug/event/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace rmrevin\yii\pug; | |
use Pug\Pug; | |
use Yii; | |
use yii\base\View; | |
use yii\helpers\FileHelper; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Install Pug with: composer require pug-php/pug | |
$app['view'] = function () { | |
return new Pug(array( | |
'cache' => './storage/cache', | |
'paths' => array( | |
// Here you can record differents root directories | |
// containing pug templates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php return [ | |
'ab' => [ | |
'isoName' => 'Abkhazian', | |
'nativeName' => 'аҧсуа бызшәа, аҧсшәа', | |
], | |
'aa' => [ | |
'isoName' => 'Afar', | |
'nativeName' => 'Afaraf', | |
], | |
'af' => [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Date('2001-12-31T23:59:59.000000Z').toLocaleString('en-US', { | |
timeZone: 'Asia/Calcutta' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
date_default_timezone_set('UTC'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$inputDateString = '2018-05-12 23:16:46.123456'; // get from DB or some API | |
$date = new DateTimeImmutable($inputDateString); | |
echo $date->format('Y-m-d\TH:i:s.u\Z'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dateString = '2018-05-12T23:16:46.123456Z'; // get from your PHP server (JSON API, data-* attribute, etc.) | |
date = new Date(dateString); | |
alert(date.toLocaleString()); |
OlderNewer