GoConqr has a new look! Let us know what you think.

Module 5 of 11 · Media

Book a future day event

Kostas Diakogiannis

Book a future day event

D-1 Book future day event

Create a function that accepts two Date objects as arguments.

The first one is the current date (today) and the second one a future date that the user wants to book a seat on an event you are organizing.

Compare the dates, and if the second date is a future date then print ('Your book to the event for the 25th April 2019 is already guaranteed!')  given that this is the future date. Use some of the methods you learned to extract the info in order to construct your message nicely.

If it is not a future date print a message that informs the user that he should select a future date.

hint: Future dates are bigger than previous dates in comparison operations

 

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?