Current version 22.0.0

Date & time

import { DateTimeFormatterPipe } from '@trademe/tangram';

The date & time formatter displays date & time values in a consistent format optimised for readability.

When using custom Tangram pipes in a component.ts file, provide the pipe directly and use the public transform method.

Example

Wed 15 Apr, 10:33 am

API option

format
shortlongtime

Code

{{ new Date(2015, 3, 15, 10, 33) | tgDateTime }}

Behaviour

Proudly made by © 2026 Trade Me Limited