I wanted to post this under discussions, but the link was not working
3. The isDateOdd() method must return true if the number of days since the beginning of the year is odd, and must otherwise return false.
JANUARY 1 2000 = true
JANUARY 2 2020 = false
What do we assume as the beginning of the year?
I first assumed it was Jan 1 which is zero days from the beginning. With this assumption Jan 2 will be one day from the beginning so the isDateOdd() method should return true.
I don't understand the logic for Jan 1 being 1 day from the beginning of the year.
Completed the task but instructions are a bit unclear
Resolved
Comments (5)
- Popular
- New
- Old
You must be signed in to leave a comment
Gellert Varga
5 June 2020, 17:35
"The number of days since the beginning of the year" - I think:
= The ordinal number / sequential number of the days of the year
What day of the month is it?
But here: what day of the year is it?
jan.1. = first day = 1 (=odd)
jan.2 = second day = 2 (= even)
jan 31 = 31.day (odd)
febr 1 = 32.day (even)
etc.
0
Mayu
5 June 2020, 18:41
Thank you for the reply;
I'm a little confused by what you mean by ordinal number and sequential number.
Am I right in saying the ordinal number for Jan 1 is 1,
And what would the sequential number be?
0
Gellert Varga
5 June 2020, 19:46
I'm sorry, my english is not too good. To express myself correctly is a little bit difficult for me...
(Dictionaries do not give totally clear words always.)
Yes, i mean by ordinal number:
if something is the first, then it equals to 1 , etc.
0
Mayu
5 June 2020, 22:54
Thank you Gellert Varga. Your English is pretty good.
0
Gellert Varga
6 June 2020, 20:05
:-)
0