from datetime import datetime


def date_from_string(indate):
  """ Returns a python datetime.date object from a string formatted as
  '2012-11-21' = 'yyyy-mm-dd' """
  return datetime.strptime(indate, "%Y-%m-%d").date()