title: Compare and change the date format like today, yesterday,
body: <p>I have the following data:</p>
  
  <pre><code>     {
         "content": [
         {
           "id": 15076772,
           "date": "2019-06-26T15:37:36"
         },
         {
          "id": 15074042,
          "date": "2019-03-05T15:06:57"
         },
         {
          "id": 15073812,
          "date": "2019-09-17T14:32:18"
         },
         {
          "id": 15073810,
          "date": "2019-09-18T14:31:56"
         }
       ]
     }
  </code></pre>
  
  <p>and I would like to convert each date to a specific format depending on the date of the day</p>
  
  <p>if the newDate() = 2019-09-18T14: 31: 56 we would post today
  if the newDate() is not equal to the date of the day but to that of yesterday would be displayed yesterday </p>
  
  <p>then after the days of the week depending on the date and after a week of departure the normal date of the data.
  a bit like the dates displayed in a chat system</p>
  
  <p>I do not know if angular can do it automatically</p>
  
  <p>I do not know if angular can do it automatically, I know that Moment.js can do it with calendar time.</p>
  
  <p>If anyone could teach me that would be nice.</p>