def normalizeDuration(periodType, timeToElapse):
  """Returns number of days given periodType and timeToElapse"""
  if periodType == "weeks":
    return timeToElapse*7
  if periodType == "months":
    return timeToElapse*30
  return timeToElapse