Netanel Basal

Learn development with great articles

It’s Probably Not Necessary to Use Angular’s Date Pipe

--

Dates are an integral part of almost every application. Angular provides a date pipe out-of-the-box. The date pipe allows users to convert dates according to predefined or custom Angular date formats. For example:

Using it today is disadvantageous because we load a bunch of code when we can probably achieve the same functionality natively. The Intl.DateTimeFormat API can be used unless there is a special use-case you need that is only supported by Angular.

Let’s use that as the basis for a date pipe:

It can be customized to meet your needs. It supports timezones, locales, and custom formats, among other features.

Browser Support

Follow me on Medium or Twitter to read more about Angular and JS!

--

--

Netanel Basal
Netanel Basal

Written by Netanel Basal

A FrontEnd Tech Lead, blogger, and open source maintainer. The founder of ngneat, husband and father.

Responses (2)