Skip to main content

TimeAgoPipe

Converts a date into the format "3 minutes ago", "5 hours ago" etc.

Example

HTML
Signature
  • Implements: PipeTransform

constructor

method(i18nService: I18nService) => TimeAgoPipe

transform

method(value: string | Date, nowVal?: string | Date) => string
Was this chapter helpful?
Report Issue
Edited Feb 23, 2026ยทEdit this page