Skip to content

madand/yii2-momentjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

moment asset for Yii2

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.

About

moment asset for Yii2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages