eggnukes / yii2-moment
Moment.js and Moment Timezone assets for Yii2
Installs: 971
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/moment: ~2.0
- bower-asset/moment-timezone: ~0.5
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2025-06-28 06:08:44 UTC
README
Moment.js and Moment Timezone assets for Yii2.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist eggnukes/yii2-moment "*"
or add
"eggnukes/yii2-moment": "*"
to the require section of your composer.json
file.
Usage
Register the needed asset in your view file:
\eggnukes\moment\MomentAsset::register($this);
\eggnukes\moment\MomentWithLocaleAsset::register($this);
\eggnukes\moment\MomentTimezoneAsset::register($this);
MomentTimezoneAsset depends on MomentWithLocaleAsset by default.