Pergunta de entrevista da empresa Amazon

Two dates are given to a function. The function should return if the dates are exactly one month apart, less than one month apart or more than one month apart.