title: Get year,month and day from python variable
body: <p>I'd like to get the break of a variable by year, month and day. Here's what I got:</p>
  
  <pre><code>import datetime
  from datetime import date, timedelta
  yesterday = date.today() - timedelta(1)
  print (yesterday)
  year = datetime.date.yesterday.year
  month = datetime.date.yesterday.month
  day=datetime.date.yesterday.day
  print (year)
  print (month)
  print (day)
  </code></pre>
  
  <p>I'm getting an error that datetime.date has no attribute. I'm a total noob at python and I'm stuck, any help is appreciated</p>