This is a sample application to ask users questions from the command line. Once all questions have been answered their responses will be shown.
Run the app using php quest.php
Update the application to validate dates and display them formatted like Mon 4th Nov, 2020
.
-
It must accept the following formats
d/m/y
d.m.y
d-m-y
whered
andm
are 1 or 2 characters andy
is 2 or 4 characters. Additionally it must also accepty-m-d
wherey
is 4 characters. -
It must handle input with leading and trailing spaces
-
Where dates have two digit years, assume that you’ll only be given 2 digit years for dates in the next 5years, otherwise it will be in the past.
Note: You can ignore timezones.
- Please duplicate the project to a private GitHub repository
- Familiarise yourself with the App and how it works
- Make the required changes as above
- Invite the reviewer to the repository when you've completed the assessment.
We're looking for best all round effort. Keep things clean, using all best practices. Start a timer when you start, and stop once you finish and let us know how long this task has taken you. We'd prefer you spend a little longer making it amazing over quick work.
Bonus Points
If you think anything is missing in the App, feel free to make changes. But exclude this from your timer.