mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
* [ADF-4152] Moved core library docs into subfolders * [ADF-4152] Moved core library docs into subfolders * [ADF-4152] Manual fixes to core doc file links * [ADF-4152] Further automatic + manual link tidying
29 lines
578 B
Markdown
29 lines
578 B
Markdown
---
|
|
Title: Time Ago pipe
|
|
Added: v2.0.0
|
|
Status: Active
|
|
Last reviewed: 2018-11-19
|
|
---
|
|
|
|
# [Time Ago pipe](../../../lib/core/pipes/time-ago.pipe.ts "Defined in time-ago.pipe.ts")
|
|
|
|
Converts a recent past date into a number of days ago.
|
|
|
|
## Basic Usage
|
|
|
|
<!-- {% raw %} -->
|
|
|
|
```HTML
|
|
<div>
|
|
Last modified: {{ date | adfTimeAgo }}
|
|
</div>
|
|
```
|
|
|
|
<!-- {% endraw %} -->
|
|
|
|
## Details
|
|
|
|
The pipe finds the difference between the input date and the current date. If it
|
|
is less than seven days then then the date will be formatted as "X days ago".
|
|
Otherwise, the usual full date format is used.
|