Prepare for the Easter! (retired)
Description:
Ho!ho!ho! Christmas time is over, now we gotta wait for Easter to get some rest again! but wait... when is it? It's not so easy to remember all the Easter dates. Let's calculate that!
In this Kata your mission is to write a boolean method called 'easter?' (JS: 'isEaster()') which works only with Date class instances. For example:
Date.new(2014,12,12).easter?
should return false, while
Date.new(2014,4,20)
is definitely true!
To make everything clear and easy here we have some facts about this Kata:
we're using Gregorian Calendar and talking about Western Easter dates
as our method is a boolean method on Date class instances, we expect not to pass any other objects to our method (including nil and e.g. MyBrandNewBike class)
we're not interested in the middle ages and the far away future so we're only checking the Easter dates in for 1985-2045 years.
we know that the Easter Monday is usually a day to chill out as well and it's a part of Easter, but if you know the Easter Sunday date you also know the next day is Easter Monday - it's too obvious, we're looking only for the Easter Sunday here! That's the only way our method returns true.
Similar Kata:
Stats:
Created | Dec 26, 2014 |
Warriors Trained | 194 |
Total Skips | 105 |
Total Code Submissions | 184 |
Total Times Completed | 37 |
Ruby Completions | 22 |
JavaScript Completions | 18 |
Total Stars | 3 |
% of votes with a positive feedback rating | 59% of 11 |
Total "Very Satisfied" Votes | 4 |
Total "Somewhat Satisfied" Votes | 5 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 14 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |