Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 607 Bytes

is_your_period_late.md

File metadata and controls

21 lines (14 loc) · 607 Bytes

Description

In this kata, we will make a function to test whether a period is late.

Our function will take three parameters:

last - The Date object with the date of the last period

today - The Date object with the date of the check

cycleLength - Integer representing the length of the cycle in days

Return true if the number of days passed from last to today is greater than cycleLength. Otherwise, return false.

My Solution

def period_is_late(last,today,cycle_length)
  today - last > cycle_length
end