AngularJS directive and filters for Moment.js. Angular moment provides the `am-time-ago` directive and a number of filters that include `amParse`, `amFromUnix`, `amUtc`, `amUtcOffset` and `amLocal`. Make sure to include momentjs and angularjs tags along with this tag.
Angular moment is a plugin that adds the following directives and filters to AngularJS based on the moment.js library.
- Directives
am-time-ago- Use to format relative timestamps
- Filters
amDateFormat- Format a date using moment.jsformat()methodamDurationFormat- Format a duration in a human readable formatamCalendar- Format a date using moment.jscalendar()methodamTimezone- Apply a timezone to the given date or moment objectamLocal- Change the given moment object to be in the local timezoneamUtc- Create or switch the current moment object into UTC modeamUtcOffset- Use the given UTC offset when displaying a dateamFromUnix- Convert a unix-timestamp into a moment objectamParse- Parse a custom-formatted date into a moment objectamAdd- Add hours, minutes or seconds from the specified date.amSubtract- Subtract hours, minutes or seconds from the specified date.amDifference- Get the difference between two dates in millisecondsamStartOf- Mutate the original moment by setting it to the start of a minute, hour or day of time.amEndOf- Mutate the original moment by setting it to the end of a minute, hour or day of time.
References
Related Tags