The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →DATE_PIPE_DEFAULT_OPTIONS lets you set shared default formatting and timezone values for Angular’s DatePipe. Provide an options object with dateFormat, timezone, or both. A value passed directly to an individual pipe expression takes precedence for that expression.
What DATE_PIPE_DEFAULT_OPTIONS does
DATE_PIPE_DEFAULT_OPTIONS is an Angular dependency-injection token, not a pipe argument or a date-format string. It supplies defaults that DatePipe uses when a template expression omits its format or timezone. The options object supports dateFormat and timezone. See Angular’s DATE_PIPE_DEFAULT_OPTIONS API reference.
As an Amazon Associate I earn from qualifying purchases.
If the token does not provide a value, the documented format fallback is mediumDate, and the timezone fallback is the end user’s local system timezone. These are separate defaults: you can configure either field without configuring the other. Angular documents this behavior in its DatePipe API reference.
Set a default format or timezone
Import the token from @angular/common and provide an object through the application or injector providers used by your app:
#1 Best Overall
import { DATE_PIPE_DEFAULT_OPTIONS } from '@angular/common';
{ provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: { dateFormat: 'shortDate', timezone: 'UTC' } }
This example sets both defaults. To set just one, omit the other property—for example, provide { dateFormat: 'shortDate' } to set a format without changing the timezone default. Angular’s reference demonstrates configuring the fields through useValue; choose provider placement that matches your application’s bootstrap and injector setup.
Choose shared defaults or per-expression arguments
The token is useful when many date displays should share a default. An individual expression can still specify its own format, timezone, and locale using DatePipe’s syntax:
Rank #2
{{ value_expression | date:format:timezone:locale }}
| Configuration | Scope | What it controls |
|---|---|---|
DATE_PIPE_DEFAULT_OPTIONS |
Shared default for DatePipe uses whose arguments are omitted | dateFormat and/or timezone |
| Arguments in a DatePipe expression | One expression | That expression’s format, timezone, and locale |
When an expression supplies a format or timezone, that explicit value takes precedence over the corresponding token default. An omitted value can still use the configured default. For details on the pipe’s argument order and behavior, see Angular’s DatePipe API reference.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Replace the deprecated timezone-only token
DATE_PIPE_DEFAULT_TIMEZONE is deprecated. Angular directs applications to use DATE_PIPE_DEFAULT_OPTIONS instead, placing the timezone in the options object:
Rank #3
{ provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: { timezone: 'UTC' } }
Angular’s deprecated token reference names the replacement. It does not state a removal version, so do not assume a particular release removes the old token. Check the documentation for the Angular version installed in your project before relying on version-specific details.
Quick Recap
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




