def normalise_days(periodType, value):
  """
  This is a helper function to normalise periodtype
  to always reflect the number of days
  """
  periodType = periodType.lower()
  normalised_days = 0
  if periodType == 'weeks':
    normalised_days = value * 7
  elif periodType == 'months':
    normalised_days = value * 30
  else:
    normalised_days = value
  return normalised_days