← All pipes
Dates

dateParts

Structured Intl calendar fields for segmented date UI.

Use it in your component

Standalone component
import { Component } from '@angular/core';
import { JsonPipe } from '@angular/common';
import { DatePartsPipe } from 'extra-pipe';

@Component({
  standalone: true,
  imports: [DatePartsPipe, JsonPipe],
  template: `{{ "2026-01-02T12:00:00Z" | dateParts: "UTC" | json }}`,
})
export class ExampleComponent {

}

Template
{{ "2026-01-02T12:00:00Z" | dateParts: "UTC" | json }}

Try it live.

The output below runs the packed library. Edit data, not code.

Use double quotes for text, or a number, array, object or null.
Ordered parameters: timeZone. Locale is controlled separately.
Applied to the live output.
Live template data
readonly value = "2026-01-02T12:00:00Z";
readonly parameter0 = "UTC";
{{ value | dateParts: parameter0: "en-US" | json }}

Rendered output

[
  {
    "type": "month",
    "value": "January"
  },
  {
    "type": "literal",
    "value": " "
  },
  {
    "type": "day",
    "value": "2"
  },
  {
    "type": "literal",
    "value": ", "
  },
  {
    "type": "year",
    "value": "2026"
  }
]