title: how to declare a date attribute on angular2 model
body: <p>I'm using Rails 5 + Angular2 to make a web application and I have a model called "Books". My problem, is that I have a file called "books.ts" that has the code:</p>
  
  <pre><code>export class Book {
  id: number;
  author_one: string;
  author_two: string;
  author_three: string;
  title: string;
  subtitle: string;
  publisher: string;
  year: date;
  city: string;
  edition: number;
  volume: number;
  pages: number;
  ISBN: string;
  barcode: string;
  }
  </code></pre>
  
  <p>But when I run "ng serve --port 9000" I got the following error:</p>
  
  <pre><code>Cannot find name 'date'.
  </code></pre>
  
  <p>Before I was having the same problem with other attributes, because I was using "integer", but I changed it to "number" and it worked, so I'm wondering if it's a question of Angular not understanding certain types of attributes. But after searching the internet I have not found how to declare a variable of type "date" in Angular.
  Is there any way to declare the variable of type date? Or should I use a string and have some sort of treatment to use it as a date?</p>