user.rb
test.rb
- To clone the solution run:
git clone git@github.com:collinsugwu/CharlieHR.git
- To execute the solution run:
ruby test.rb
User#birthday?
1990-01-01 -> false
1990-01-30 -> false
1990-10-01 -> false
1990-10-02 -> true
1990-10-31 -> false
1990-12-01 -> false
1990-12-30 -> false
User#age
1990-01-01 -> 33
1990-01-30 -> 33
1990-10-01 -> 33
1990-10-02 -> 33
1990-10-31 -> 32
1990-12-01 -> 32
1990-12-30 -> 32
User#next_birthday
1990-01-01 -> 2024-01-01
1990-01-30 -> 2024-01-30
1990-10-01 -> 2024-10-01
1990-10-02 -> 2024-10-02
1990-10-31 -> 2023-10-31
1990-12-01 -> 2023-12-01
1990-12-30 -> 2023-12-30