title: Angular2 using date pipe for an array of dates
body: <p>I'm new to front-end development and Angular2.</p>
  
  <p>I'm writing an app where I'm given a fromDate and an endDate, and the app needs to display the date range. For example, <code>fromDate = '10/02/2016' endDate = '11/02/2016'</code>, the app will display the date range as: 10-11 Feb 2016, and this date range format may change in the future (also need to consider the cases where months or years are different of course).</p>
  
  <p>My thought is to use chaining pipes: <code>{{ dateArray | date: 'dd/MM/yyyy' | rangeDate}}</code> where <code>dateArray = [fromDate, endDate]</code> and I hope <code>{{ dateArray | date: 'dd/MM/yyyy'}}</code> can return two formatted date strings (in an array) so I can then use my custom pipe I create:</p>
  
  <pre><code>import {Pipe, PipeTransform} from '@angular/core';
  
  @Pipe({name: 'dateRange'})
  export class DateRangePipe implements PipeTransform {
    transform(value: string[], args: any[]) {
      return "desired output";
    }
  }
  </code></pre>
  
  <p>to easily manipulate with the two strings two get the desired output.</p>
  
  <p>But this is wrong because Angular 2 Date Pipe cannot transfer more than one date value to string and it's return type is <code>string</code>, not <code>string[]</code>.</p>
  
  <p>So I was wondering if there is a way to write a for-loop-like thing in HTML to achieve this task. Like, it takes a <code>date[]</code>, and send each of its item to the date pipe, and combine the results into a <code>string[]</code> and send it to dateRange pipe.</p>