title: How to use angular2 built-in date pipe in services and directives script files
body: <p>I need to use angular2's date pipe in services and directives script files(not only in HTML).</p>
  
  <p>Does anyone have ideas?</p>
  
  <p>Can't upload code cos some policy restrictions, sorry about that.</p>