Is it Time for Milk and Cookies?

Published by kochug in

Christmas Eve is almost upon us, so naturally we need to prepare some milk and cookies for Santa! Create a method that accepts a GregorianCalendar object and returns true if it's Christmas Eve (December 24th) and false otherwise.

Examples

GregorianCalendar(2013, 11, 24) ➞ true

GregorianCalendar(2013, 0, 23) ➞ false

GregorianCalendar(3000, 11, 24) ➞ true

Notes

  • Dates are zero based (see resources).
  • All test cases contain valid dates.
Watch a quick demo on how Edabit works.