wes d2a2ba9e15 first commit | 4 anos atrás | |
---|---|---|
.. | ||
README.md | 4 anos atrás | |
code.cpp | 4 anos atrás | |
unitTest.cpp | 4 anos atrás |
by Alex Golubov tags: validation, dates
Christmas Eve is almost upon us, so naturally we need to prepare some milk and cookies for Santa! Create a function that accepts a (year, month, day) of date and returns true if it's Christmas Eve (December 24th) and false otherwise. Keep in mind that month of Date is 0 based, meaning December is the 11th month while January is 0. Examples timeForMilkAndCook
Christmas Eve is almost upon us, so naturally we need to prepare some milk and cookies for Santa! Create a function that accepts a (year, month, day)
of date and returns true
if it's Christmas Eve (December 24th) and false
otherwise. Keep in mind that month
of Date is 0 based, meaning December is the 11th month while January is 0.
timeForMilkAndCookies(2013, 11, 24) ➞ true
timeForMilkAndCookies(2013, 0, 23) ➞ false
timeForMilkAndCookies(3000, 11, 24) ➞ true