title: Override Angular default date pipe
body: <p>I need to override the default Angular 7 date pipe formats (<code>medium</code>, <code>short</code>, <code>fullDate</code>, etc.), because I don't want to use two date pipes (the default one and a custom one), so I made the following and was wondering is a good idea to do it like so:</p>
  <pre class="lang-js prettyprint-override"><code>// extend-date.pipe.ts
  import { Pipe, PipeTransform } from '@angular/core';
  import { DatePipe } from '@angular/common';
  
  @Pipe({
    name: 'date'
  })
  export class ExtendDatePipe extends DatePipe implements PipeTransform {
    constructor() {
      super('en-US');
  
      this.customDateFormats = {
        medium: '...',
        short: '...',
        fullDate: '...',
        longDate: '...',
        mediumDate: '...',
        shortDate: '...',
        mediumTime: '...',
        shortTime: '...'
      };
    }
  
    transform(value: any, args?: any): any {
      switch (args) {
        case 'medium':
          return super.transform(value, this.customDateFormats.medium);
        case 'short':
          return super.transform(value, this.customDateFormats.short);
        case 'fullDate':
          return super.transform(value, this.customDateFormats.fullDate);
        case 'longDate':
          return super.transform(value, this.customDateFormats.longDate);
        case 'mediumDate':
          return super.transform(value, this.customDateFormats.mediumDate);
        case 'shortDate':
          return super.transform(value, this.customDateFormats.shortDate);
        case 'mediumTime':
          return super.transform(value, this.customDateFormats.mediumTime);
        case 'shortTime':
          return super.transform(value, this.customDateFormats.shortTime);
        default:
          return super.transform(value, args);
      }
    }
  }
  
  // app.component.html
  {{ someDate | date: 'medium' }} // The custom format will be displayed
  </code></pre>
  <p>If I use something like <code>{{ someDate | date: 'MM/dd/yyyy' }}</code> it works as well.</p>
  <p>So basically, I'm wondering is there a case where this will not work properly or maybe there is a better way to achieve this, but with different implementation?</p>