Provides the asset bundle for easy integration of moment into your Yii2 application.
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist "uz/yii2-momentjs:*"
or add
"uz/yii2-momentjs": "*"
to the require
section of your composer.json
file.
In the view file register the asset:
// Register only core momentjs with no locale data
\uz\momentjs\MomentJsAsset::register($this);
// Register core momentjs with current app locale. Current locale is activated on DOM ready.
\uz\momentjs\MomentJsLocaleAsset::register($this);
// Register core momentjs with all locales supported by the momentjs.
\uz\momentjs\MomentJsAllLocalesAsset::register($this);
The MIT License. Please see License File for more information.