madand / yii2-momentjs
moment asset for Yii2
dev-master
2015-11-19 11:54 UTC
Requires
- bower-asset/moment: *
- yiisoft/yii2: ~2.0.0
This package is not auto-updated.
Last update: 2026-03-01 01:04:09 UTC
README
Provides the asset bundle for easy integration of moment into your Yii2 application.
Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist "madand/yii2-momentjs:*"
or add
"madand/yii2-momentjs": "*"
to the require section of your composer.json file.
Usage
In the view file register the asset:
// Register only core momentjs with no locale data \madand\momentjs\MomentJsAsset::register($this); // Register core momentjs with current app locale. Current locale is activated on DOM ready. \madand\momentjs\MomentJsLocaleAsset::register($this); // Register core momentjs with all locales supported by the momentjs. \madand\momentjs\MomentJsAllLocalesAsset::register($this);
License
The BSD License (BSD). Please see License File for more information.