mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4342] Create localized pipe and centralize date format (#4813)
* [ADF-4342] Date Format defined in app config * [ADF-4342] Create localized pipe and centralize date format * Add unit test for new date pipe * Add info internationalization docs * Fix lining * Fix linting * Fix date pipe unit test * [ADF-4342] Add supported language files * Fix e2e tests
This commit is contained in:
committed by
Denys Vuika
parent
990fa4625b
commit
7497822a46
@@ -21,8 +21,14 @@ Converts a recent past date into a number of days ago.
|
||||
|
||||
<!-- {% endraw %} -->
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| locale | string | 'en-US' | A locale id for the locale format rules to use. |
|
||||
|
||||
## 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.
|
||||
|
||||
By default, it localizes the date to the language that is currently in use by the app. Furthermore, a different locale id can be passed to the pipe to overwrite the locale id to set a custom one.
|
||||
|
Reference in New Issue
Block a user