Skip to content

webtoolsnz/code-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coding Test

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

Your Task

Update the application to validate dates and display them formatted like Mon 4th Nov, 2020.

  1. It must accept the following formats d/m/y d.m.y d-m-y where d and m are 1 or 2 characters and y is 2 or 4 characters. Additionally it must also accept y-m-d where y is 4 characters.

  2. It must handle input with leading and trailing spaces

  3. 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.

Steps

  1. Please duplicate the project to a private GitHub repository
  2. Familiarise yourself with the App and how it works
  3. Make the required changes as above
  4. 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.

Releases

No releases published

Packages

No packages published

Languages