uz/yii2-momentjs

MomentJS asset for Yii2

Installs: 17 800

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 1

Open Issues: 0

Type:yii2-extension

v1.0.2 2017-10-19 14:50 UTC

This package is not auto-updated.

Last update: 2024-05-12 03:27:50 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 "uz/yii2-momentjs:*"

or add

"uz/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
\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);

License

The MIT License. Please see License File for more information.