Questions tagged [angular2-moment]

Angular2 moment provides pipes for using momentjs methods in the angular environment. Make sure to include momentjs and angular tags along with this tag. Use angular-moment tag for the angularjs version of the library.

angular2 moment is a plugin that adds the following pipes to Angular based on the moment.js library.

  • Pipes
    • amTimeAgo - Use to format relative time
    • amCalendar - Format a date using moment.js calendar() method
    • amDateFormat - Format a date using moment.js format() method
    • amParse - Parse a custom-formatted date into a moment object
    • amFromUnix - Convert a unix-timestamp into a moment object
    • amDuration - Format a duration in a human readable format
    • amDifference - Get the difference between two dates in milliseconds
    • amAdd - Add hours, minutes or seconds from the specified date.
    • amSubtract - Subtract hours, minutes or seconds from the specified date.
    • amUtc - Create or switch the current moment object into UTC mode

References

Related Tags

46 questions
-1
votes
1 answer

Angular moment convert DDMMYYYY/MMDDYYYY/YYYYMMDD to Any format(DD/MM/YYYY)

I am using angular mat date input, at MomentDateAdapter parse date I want to convert input number to a specific date format. eg | Input |InpurtFormat|OutputFormat| Output | |-------:|-----------:|-----------:|---------:| |21102012|…
1 2 3
4