Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

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

 

Book a future day event

Kostas Diakogiannis
Module by Kostas Diakogiannis, updated more than 1 year ago
No tags specified