mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* fix documentation missing params * fix index * fix aftere release * fix aftere review * upgrade guide from 3.2.0 to 3.3.0 * upgrade guide from 3.2.0 to 3.3.0
1.6 KiB
1.6 KiB
Title, Added, Status
Title | Added | Status |
---|---|---|
Localized Date pipe | v3.3.0 | Active |
Localized Date pipe
Converts a date to a given format and locale.
Basic Usage
<div>
Created date: {{ date | adfLocalizedDate }}
</div>
Properties
Name | Type | Default value | Description |
---|---|---|---|
format | string | 'medium' | A format to apply to the date value. Date Pipe Formats. |
locale | string | 'en-US' | A locale id for the locale format rules to use. |
Details
The pipe takes a date and formats it and localizes it so the date is displayed in the proper format for the region. It uses the Angular Date Pipe so all the pre-defined and custom formats can be used.
To localize the dates in your application, you will need to add the specific locale file for your region in order to use it. Read more about internationalization here.
If you want add the japanese date localization in your ADF app you can add in your app.module.ts
:
import { AppConfigService, TRANSLATION_PROVIDER, DebugAppConfigService, CoreModule, CoreAutomationService } from '@alfresco/adf-core';
.....
.....
import { registerLocaleData } from '@angular/common';
import localeJa from '@angular/common/locales/ja';
registerLocaleData(localeJa);