title: python get previous day date in UTC using datetime(datetime.date) and timedelta
body: <p>i wanted to get previous day date in UTC .</p>
  <pre><code>from datetime import datetime, timedelta
  month_now = str(datetime.date(datetime.utcnow()))[:-3]
  </code></pre>
  <pre><code>&gt;&gt;&gt; print(month_now)
  2021-01
  </code></pre>
  <p>And now</p>
  <pre><code>previous_day = str(datetime.date(datetime.utcnow()-datetime.timedelta(days=1)))
  </code></pre>
  <p>AttributeError: type object 'datetime.datetime' has no attribute 'timedelta'</p>
  <p>Please help.All related posts was suggesting some thing like but need something with datetime.date</p>
  <pre><code>Previous_Date = datetime.datetime.today() - datetime.timedelta(days=1)
  </code></pre>