¡GoConqr estrena diseño! Cuéntanos qué te parece.

Módulo 5 de 11 · Multimedia

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

 

Instrucciones

Para avanzar en el curso, envía un intento de este test. Puedes enviarlo después de la última pregunta.

Ir al módulo elegido

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?