angular-moment-hijri
This is a merge between @urish's angular-moment and xsoh's moment-hijri
angular-moment is an AngularJS directives and filters for Moment.JS.
moment-hijri is a Hijri (Based on Umm al-Qura calculations) calendar system plugin for Moment.JS.
Installation
- Bower:
bower install angular-moment-hijri --save
- Download from github: angular-moment-hijri.min.js
Usage
Include both moment.js and angular-moment-hijri.js in your application.
Add angularMomentHijri
as a dependency to your app module:
var myApp = angular;
If you need Arabic support, load ar-sa.js locale file first:
Then call the amMoment.changeLocale()
method (e.g. inside your app's run() callback):
myApp;
amDateFormat filter
Format dates using moment.js format() method. Example:
myApp;
{{message.time | amDateFormat:'dddd, hMMMM hYYYY, hh:mm:ss a'}}
This snippet will format the given time as "Tuesday, Jumada al-Ula 1436, 07:10:20 am".
For more information about Moment.JS formatting options, see the docs for the format() function.
License
Released under the terms of MIT License.